Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/ArtyCodingStandard/PHPAt/CleanArchitectureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

final class CleanArchitectureTest
{
public function test_domain_does_not_depend_on_application(): Rule
public function testDomainDoesNotDependOnApplication(): Rule
{
return PHPat::rule()
->classes(Selector::inNamespace('App\Domain'))
Expand All @@ -19,7 +19,7 @@ public function test_domain_does_not_depend_on_application(): Rule
->because('Domain is the core layer and must remain independent of outer layers');
}

public function test_domain_does_not_depend_on_infrastructure(): Rule
public function testDomainDoesNotDependOnInfrastructure(): Rule
{
return PHPat::rule()
->classes(Selector::inNamespace('App\Domain'))
Expand All @@ -28,7 +28,7 @@ public function test_domain_does_not_depend_on_infrastructure(): Rule
->because('Domain must not know about infrastructure concerns (DB, HTTP, etc.)');
}

public function test_domain_does_not_depend_on_symfony(): Rule
public function testDomainDoesNotDependOnSymfony(): Rule
{
return PHPat::rule()
->classes(Selector::inNamespace('App\Domain'))
Expand All @@ -37,7 +37,7 @@ public function test_domain_does_not_depend_on_symfony(): Rule
->because('Domain must be framework-agnostic');
}

public function test_domain_does_not_depend_on_doctrine(): Rule
public function testDomainDoesNotDependOnDoctrine(): Rule
{
return PHPat::rule()
->classes(Selector::inNamespace('App\Domain'))
Expand All @@ -46,7 +46,7 @@ public function test_domain_does_not_depend_on_doctrine(): Rule
->because('Domain must not depend on persistence concerns');
}

public function test_application_does_not_depend_on_infrastructure(): Rule
public function testApplicationDoesNotDependOnInfrastructure(): Rule
{
return PHPat::rule()
->classes(Selector::inNamespace('App\Application'))
Expand All @@ -55,7 +55,7 @@ public function test_application_does_not_depend_on_infrastructure(): Rule
->because('Application layer must depend on Domain abstractions, not Infrastructure implementations');
}

public function test_application_does_not_depend_on_symfony(): Rule
public function testApplicationDoesNotDependOnSymfony(): Rule
{
return PHPat::rule()
->classes(Selector::inNamespace('App\Application'))
Expand All @@ -64,12 +64,15 @@ public function test_application_does_not_depend_on_symfony(): Rule
->because('Application use-cases must be framework-agnostic');
}

public function test_application_does_not_depend_on_doctrine(): Rule
public function testApplicationDoesNotDependOnDoctrine(): Rule
{
return PHPat::rule()
->classes(Selector::inNamespace('App\Application'))
->shouldNotDependOn()
->classes(Selector::inNamespace('Doctrine'))
->because('Application layer must not depend on persistence concerns — use Domain repository interfaces instead');
->because(
'Application layer must not depend on persistence concerns'
. ' — use Domain repository interfaces instead'
);
}
}
Loading