1
0
Fork 0
mirror of https://github.com/archtechx/laravel-seo.git synced 2025-12-12 09:54:03 +00:00
This commit is contained in:
Samuel Štancl 2021-05-24 10:53:00 +02:00
parent 051a32575c
commit b12c9ecb55
21 changed files with 750 additions and 86 deletions

View file

@ -0,0 +1,21 @@
<?php
test('values can be modified using modifiers', function () {
seo()->title(modify: fn (string $title) => $title . ' | ArchTech');
seo()->title('About us');
expect(seo('title'))->toBe('About us | ArchTech');
});
test('modifiers are applied on values returned from set', function () {
seo()->title(modify: fn (string $title) => $title . ' | ArchTech');
expect(seo(['title' => 'Blog']))->toHaveKey('title', 'Blog | ArchTech');
});
test('modifiers are not applied on default values', function () {
seo()->title(modify: fn (string $title) => $title . ' | ArchTech', default: 'ArchTech — Web development agency');
expect(seo('title'))->toBe('ArchTech — Web development agency');
});