Testing: Added favicon cleanup

Was leaving a changed favicon leaving other test to fail.
This commit is contained in:
Dan Brown 2023-10-03 14:50:54 +01:00
parent b24296e0c9
commit 1005f4bd7a
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 10 additions and 0 deletions

View File

@ -159,4 +159,12 @@ class FileProvider
$fileService->deleteFile($file);
}
}
/**
* Reset the application favicon image in the public path.
*/
public function resetAppFavicon(): void
{
file_put_contents(public_path('favicon.ico'), file_get_contents(public_path('icon.ico')));
}
}

View File

@ -32,6 +32,8 @@ class PwaManifestTest extends TestCase
public function test_manifest_uses_configured_icons_if_existing()
{
$this->beforeApplicationDestroyed(fn() => $this->files->resetAppFavicon());
$resp = $this->get('/manifest.json');
$resp->assertJson([
'icons' => [[