ldc-mesbr-app/tests/Architecture/CodingStandardsTest.php

25 lines
679 B
PHP
Raw Normal View History

2026-07-24 17:19:56 +02:00
<?php
declare(strict_types=1);
describe('coding standards', function (): void {
arch()->preset()->php();
arch()->preset()->security();
arch('all source files use strict types')
->expect(['Application', 'Domain', 'Shared'])
->toUseStrictTypes();
2026-07-24 17:19:56 +02:00
arch('no sleep functions in production code')
2026-07-24 17:19:56 +02:00
->expect(['sleep', 'usleep'])
->not->toBeUsed();
arch('no singletons in production code')
->expect(['getInstance', 'instance'])
2026-07-24 17:19:56 +02:00
->not->toBeUsed();
arch('no direct filesystem writes in domain or application')
->expect(['Application', 'Domain'])
->not->toUse(['file_put_contents', 'fopen']);
2026-07-24 17:19:56 +02:00
});