28 lines
744 B
PHP
28 lines
744 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
describe('Application Architecture Rules', function (): void {
|
||
|
|
arch('Application layer does not depend on Presentation, Infra, or App')
|
||
|
|
->expect('Application')
|
||
|
|
->not->toUse([
|
||
|
|
'Presentation',
|
||
|
|
'Infra',
|
||
|
|
'Infrastructure',
|
||
|
|
'App',
|
||
|
|
]);
|
||
|
|
|
||
|
|
arch('Application layer does not depend on Illuminate framework')
|
||
|
|
->expect('Application')
|
||
|
|
->not->toUse('Illuminate');
|
||
|
|
|
||
|
|
arch('Application layer uses strict types')
|
||
|
|
->expect('Application')
|
||
|
|
->toUseStrictTypes();
|
||
|
|
|
||
|
|
arch('Application Usecase classes are final and readonly')
|
||
|
|
->expect('Application\Usecase')
|
||
|
|
->toBeReadonly()
|
||
|
|
->toBeFinal();
|
||
|
|
});
|