settings cache
This commit is contained in:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user