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/FaviconTest.php
Lars Klopstra 03c7fa5eee wip
2021-11-15 11:37:54 +01:00

27 lines
678 B
PHP

<?php
use ArchTech\SEO\Commands\GenerateFaviconsCommand;
use function Pest\Laravel\artisan;
use function PHPUnit\Framework\assertFileExists;
test('it should generate two favicons', function () {
seo()->favicon();
$from = __DIR__ . '/../stubs/logo.png';
artisan(GenerateFaviconsCommand::class, [
'from' => $from,
])->assertSuccessful();
assertFileExists(public_path('favicon.ico'));
assertFileExists(public_path('favicon.png'));
});
test('it should fail because the from path is incorrect', function () {
seo()->favicon();
artisan(GenerateFaviconsCommand::class, [
'from' => 'i/dont/exist.png',
])->assertFailed();
});