22-05-2026 Optimierung der User und Admin Panels
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled

This commit is contained in:
Kevin Adametz 2026-05-22 11:18:59 +02:00
parent d2ba22c0cf
commit e8c47b7553
73 changed files with 10282 additions and 1546 deletions

View file

@ -0,0 +1,44 @@
<?php
use Illuminate\Support\Facades\File;
test('views load fonts from local assets only', function () {
$externalFontHosts = [
'fonts.bunny.net',
'fonts.googleapis.com',
'fonts.gstatic.com',
];
foreach (File::allFiles(resource_path('views')) as $view) {
$contents = File::get($view->getRealPath());
foreach ($externalFontHosts as $host) {
$this->assertStringNotContainsString(
$host,
$contents,
$view->getRelativePathname().' references '.$host,
);
}
}
$localFontLinks = view('partials.local-fonts')->render();
expect($localFontLinks)
->toContain('fonts/inter-tight/font.css')
->toContain('fonts/source-serif-4/font.css')
->toContain('fonts/jetbrains-mono/font.css');
});
test('local font stylesheets reference font files relative to their directories', function () {
foreach (File::allFiles(public_path('fonts')) as $file) {
if ($file->getExtension() !== 'css') {
continue;
}
$this->assertStringNotContainsString(
'../fonts/',
File::get($file->getRealPath()),
$file->getRelativePathname().' still points outside its font directory',
);
}
});