-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from shahghasiadil/feature/laravel-data
pest php testing
- Loading branch information
Showing
5 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
arch('globals') | ||
->expect(['dd', 'dump', 'ray']) | ||
->not->toBeUsed(); | ||
|
||
arch('app') | ||
->expect(['Shared', 'Domain','Infrastructure','Application','Presentation']) | ||
->toUseStrictTypes(); | ||
|
||
arch('Domain can be accessed by Infrastructure and Application Layers') | ||
->expect('Domain') | ||
->toOnlyBeUsedIn(['Infrastructure', 'Application']); | ||
|
||
arch('Infrastructure should only accessed by Application Layer directly') | ||
->expect('Infrastructure') | ||
->toOnlyBeUsedIn(['Application']); | ||
|
||
arch('Application should only accessed by Presentation, Infrastructure and Domain Layer') | ||
->expect('Application') | ||
->toOnlyBeUsedIn(['Presentation', 'Infrastructure', 'Domain']); | ||
|
||
arch('Presentation should not be used in Domain, Application, Shared, Infrastructure Layer') | ||
->expect('Presentation') | ||
->not->toBeUsedIn(['Domain','Application', 'Shared', 'Infrastructure']); | ||
|
||
arch('Shared resources should be accessible by all layers') | ||
->expect('Shared') | ||
->toOnlyBeUsedIn(['Domain', 'Application', 'Infrastructure', 'Presentation']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
arch('shared interfaces/contracts test') | ||
->expect('Shared\Contracts') | ||
->toBeInterfaces(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
arch('shared enums test') | ||
->expect('Shared\Enums') | ||
->toBeStringBackedEnums(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
arch('shared traits') | ||
->expect('Shared\Traits') | ||
->toBeTraits(); |