settings cache

This commit is contained in:
2026-03-13 14:38:58 +01:00
parent 04995e3712
commit add5cca222
3 changed files with 21 additions and 8 deletions

View File

@@ -110,6 +110,22 @@ class CoreStarterkitContractTest extends TestCase
$this->assertSame([], $violations, "asset(...) JS URLs found in templates/pages:\n" . implode("\n", $violations));
}
public function testTemplatesDoNotUseDatabaseFacadeDirectly(): void
{
$violations = $this->findPatternMatchesInFiles('templates', '/\bDB::/', ['phtml']);
$this->assertSame([], $violations, "Direct DB facade usage found in templates/:\n" . implode("\n", $violations));
}
public function testTemplatesDoNotResolveServiceGatewayOrRepositoryViaDI(): void
{
$violations = $this->findPatternMatchesInFiles(
'templates',
'/app\(\s*[\\\\A-Za-z0-9_]*(?:Service|Gateway|Repository)::class\s*\)/',
['phtml']
);
$this->assertSame([], $violations, "DI resolution of Service/Gateway/Repository found in templates/:\n" . implode("\n", $violations));
}
public function testNoLegacySettingsGatewayOrServiceReferencesExist(): void
{
$patterns = [