mirror of
https://github.com/archtechx/laravel-seo.git
synced 2025-12-12 01:44:03 +00:00
Thunk support
This commit is contained in:
parent
04cfab679c
commit
084736672e
2 changed files with 18 additions and 5 deletions
|
|
@ -66,3 +66,15 @@ test('magic access gets converted to dot syntax', function () {
|
|||
expect(seo('abc.def'))->toBe('xyz');
|
||||
expect(seo()->abcDef)->toBe('xyz');
|
||||
});
|
||||
|
||||
test('thunks can be used as values', function () {
|
||||
seo()->title(fn () => 'bar');
|
||||
|
||||
expect(seo('title'))->toBe('bar');
|
||||
});
|
||||
|
||||
test('thunks can be used as deafults', function () {
|
||||
seo()->title(default: fn () => 'bar');
|
||||
|
||||
expect(seo('title'))->toBe('bar');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue