1
0
Fork 0
mirror of https://github.com/archtechx/laravel-seo.git synced 2025-12-12 09:54:03 +00:00
laravel-seo/tests/Pest/HelperTest.php
Samuel Štancl b12c9ecb55 finished
2021-05-24 10:53:00 +02:00

20 lines
537 B
PHP

<?php
use ArchTech\SEO\SEOManager;
test('the seo helper returns a SEOManager instance when no arguments are passed', function () {
expect(seo())->toBeInstanceOf(SEOManager::class);
});
test('the seo helper returns a value when an argument is passed', function () {
seo()->title('foo');
expect(seo('title'))->toBe('foo');
});
test('the seo helper accepts an array of key-value pairs', function () {
seo(['foo' => 'bar', 'abc' => 'xyz']);
expect(seo('foo'))->toBe('bar');
expect(seo('abc'))->toBe('xyz');
});