ldc-arcadia-api/tests/Architecture/NamingConventionsTest.php
Jérémy Munsch 84e59314a0
test(Architecture): add namespaces to architecture test files and create integration test suite
- Added namespaces to various architecture test files for consistency.
- Created a new integration test suite in phpunit.xml.
2026-08-13 11:25:08 +02:00

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');
});