- Added namespaces to various architecture test files for consistency. - Created a new integration test suite in phpunit.xml.
49 lines
1.5 KiB
PHP
49 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Architecture;
|
|
|
|
describe('Naming Conventions in Application', function (): void {
|
|
arch('Application usecases use strict types')
|
|
->expect('Application\Usecase')
|
|
->toUseStrictTypes();
|
|
});
|
|
|
|
describe('Naming Conventions in Domain', function (): void {
|
|
arch('Port Directories have Directory suffix')
|
|
->expect('Domain\Ports\Directories')
|
|
->toHaveSuffix('Directory');
|
|
|
|
arch('Port Repositories have Repository suffix')
|
|
->expect('Domain\Ports\Repositories')
|
|
->toHaveSuffix('Repository');
|
|
});
|
|
|
|
describe('Naming Conventions in Presentation', function (): void {
|
|
arch('Controllers have Controller suffix')
|
|
->expect('Presentation\Api\V1\Http\Controllers')
|
|
->toHaveSuffix('Controller');
|
|
|
|
arch('Requests have Request suffix')
|
|
->expect('Presentation\Api\V1\Http\Requests')
|
|
->toHaveSuffix('Request');
|
|
|
|
arch('Responses have Response suffix')
|
|
->expect('Presentation\Api\V1\Http\Responses')
|
|
->toHaveSuffix('Response');
|
|
});
|
|
|
|
describe('Naming Conventions in Infra', function (): void {
|
|
arch('Infra service providers have Provider suffix')
|
|
->expect('Infra\Providers')
|
|
->toHaveSuffix('Provider');
|
|
|
|
arch('Infra directory adapters have Directory suffix')
|
|
->expect('Infra\Adapters\Directories')
|
|
->toHaveSuffix('Directory');
|
|
|
|
arch('Infra repository adapters have Repository suffix')
|
|
->expect('Infra\Adapters\Repositories')
|
|
->toHaveSuffix('Repository');
|
|
});
|