mirror of
https://github.com/archtechx/laravel-seo.git
synced 2025-12-12 09:54:03 +00:00
wip
This commit is contained in:
parent
2fc2586691
commit
0f8cd0f225
1 changed files with 16 additions and 0 deletions
|
|
@ -3,8 +3,21 @@
|
||||||
use ArchTech\SEO\Commands\GenerateFaviconsCommand;
|
use ArchTech\SEO\Commands\GenerateFaviconsCommand;
|
||||||
|
|
||||||
use function Pest\Laravel\artisan;
|
use function Pest\Laravel\artisan;
|
||||||
|
use function PHPUnit\Framework\assertFileDoesNotExist;
|
||||||
use function PHPUnit\Framework\assertFileExists;
|
use function PHPUnit\Framework\assertFileExists;
|
||||||
|
|
||||||
|
// Clean up generated files
|
||||||
|
beforeEach(function () {
|
||||||
|
$files = [
|
||||||
|
'favicon.ico',
|
||||||
|
'favicon.png',
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($files as $file) {
|
||||||
|
@unlink(public_path($file));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
test('it should generate two favicons', function () {
|
test('it should generate two favicons', function () {
|
||||||
seo()->favicon();
|
seo()->favicon();
|
||||||
|
|
||||||
|
|
@ -24,4 +37,7 @@ test('it should fail because the from path is incorrect', function () {
|
||||||
artisan(GenerateFaviconsCommand::class, [
|
artisan(GenerateFaviconsCommand::class, [
|
||||||
'from' => 'i/dont/exist.png',
|
'from' => 'i/dont/exist.png',
|
||||||
])->assertFailed();
|
])->assertFailed();
|
||||||
|
|
||||||
|
assertFileDoesNotExist(public_path('favicon.ico'));
|
||||||
|
assertFileDoesNotExist(public_path('favicon.png'));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue