1
0
Fork 0
mirror of https://github.com/archtechx/laravel-seo.git synced 2025-12-12 09:54:03 +00:00

Add support for Favicons (#11)

* wip

* wip

* wip

* Update tests/Pest/FaviconTest.php

Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>

* Update tests/Pest/FaviconTest.php

Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>

* Update README.md

Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
This commit is contained in:
Lars Klopstra 2021-11-14 19:28:19 +01:00 committed by GitHub
parent 1b2bfb2945
commit 5ca343a116
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 66 additions and 1 deletions

View file

@ -0,0 +1,14 @@
<?php
use function PHPUnit\Framework\assertFileExists;
test("it should throw an exception if the given source icon doesn't exist", function () {
seo()->favicon('i-dont-exist.png');
})->throws(Exception::class, 'Given icon path `i-dont-exist.png` does not exist.');
test('it should generate two favicons', function () {
seo()->favicon(__DIR__ . '/../stubs/logo.png');
assertFileExists(public_path('favicon.ico'));
assertFileExists(public_path('favicon.png'));
});