first commit
This commit is contained in:
27
tests/Architecture/WiringBoundaryTest.php
Normal file
27
tests/Architecture/WiringBoundaryTest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Architecture;
|
||||
|
||||
use Tests\Architecture\Support\ArchitectureTestCase;
|
||||
|
||||
final class WiringBoundaryTest extends ArchitectureTestCase
|
||||
{
|
||||
public function testOnlyInfrastructureWiringFilesMayReferenceUiLayer(): void
|
||||
{
|
||||
foreach ($this->infrastructureFiles() as $file) {
|
||||
$code = $this->normalizedCode($file);
|
||||
|
||||
if (!$this->containsAny($code, self::UI_NAMESPACES)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
self::assertSame(
|
||||
'dependencies.php',
|
||||
basename($file),
|
||||
$this->fileRuleMessage(self::MESSAGE_WIRING_ONLY_UI_REFERENCE, $file),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user