65 lines
1.5 KiB
PHP
65 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Architecture;
|
|
|
|
describe('Shared Architecture Rules', function (): void {
|
|
arch('Shared layer does not depend on Domain, Application, Presentation, Infra, or App')
|
|
->expect('Shared')
|
|
->not->toUse([
|
|
'Domain',
|
|
'Application',
|
|
'Presentation',
|
|
'Infra',
|
|
'Infrastructure',
|
|
'App',
|
|
]);
|
|
|
|
arch('Shared layer does not depend on Illuminate or Symfony frameworks')
|
|
->expect('Shared')
|
|
->not->toUse([
|
|
'Illuminate',
|
|
'Symfony',
|
|
]);
|
|
|
|
arch('Shared layer does not use Laravel helper functions')
|
|
->expect('Shared')
|
|
->not->toUse([
|
|
'abort',
|
|
'app',
|
|
'auth',
|
|
'asset',
|
|
'back',
|
|
'bcrypt',
|
|
'broadcast',
|
|
'cache',
|
|
'config',
|
|
'cookie',
|
|
'csrf_token',
|
|
'dd',
|
|
'dump',
|
|
'decrypt',
|
|
'dispatch',
|
|
'event',
|
|
'factory',
|
|
'logger',
|
|
'redirect',
|
|
'request',
|
|
'response',
|
|
'route',
|
|
'session',
|
|
'storage',
|
|
'url',
|
|
'throw_if',
|
|
'throw_unless',
|
|
'__',
|
|
'trans',
|
|
'trans_choice',
|
|
'view',
|
|
]);
|
|
|
|
arch('Shared layer uses strict types')
|
|
->expect('Shared')
|
|
->toUseStrictTypes();
|
|
});
|