test(arch): make CodingStandardsTest standalone without container dependency
This commit is contained in:
parent
e02f5f5c2a
commit
53a5990c3a
1 changed files with 3 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ function getTestFiles(array $directories): array
|
|||
{
|
||||
$files = [];
|
||||
foreach ($directories as $dir) {
|
||||
$path = base_path($dir);
|
||||
$path = dirname(__DIR__, 2) . '/' . ltrim($dir, '/');
|
||||
if (! is_dir($path)) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -91,10 +91,10 @@ describe('Coding Standards & Project Rules', function (): void {
|
|||
->toUseStrictTypes();
|
||||
|
||||
it('ensures every database seeder has a corresponding integration test', function (): void {
|
||||
$seederFiles = glob(base_path('database/seeders/*Seeder.php')) ?: [];
|
||||
$seederFiles = glob(dirname(__DIR__, 2) . '/database/seeders/*Seeder.php') ?: [];
|
||||
foreach ($seederFiles as $file) {
|
||||
$basename = basename($file, '.php');
|
||||
$testFile = base_path("tests/Integration/Database/Seeders/{$basename}Test.php");
|
||||
$testFile = dirname(__DIR__, 2) . "/tests/Integration/Database/Seeders/{$basename}Test.php";
|
||||
expect(file_exists($testFile))->toBeTrue(
|
||||
"Missing integration test for seeder [{$basename}]. Expected at [{$testFile}]."
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue