fix(cloud): centralize test-double autoloading via composer files
Move InMemoryRepositories.php from require_once workaround to composer files-autoload. Enables PSR-4 autoloading of test-double classes and scales for 5+ future test files. All 8 tests pass with require_once removed.
This commit is contained in:
parent
67b9999a31
commit
4bbd28f95f
3 changed files with 1789 additions and 2 deletions
|
|
@ -4,5 +4,8 @@
|
|||
"require": { "php": ">=8.2" },
|
||||
"require-dev": { "phpunit/phpunit": "^11" },
|
||||
"autoload": { "psr-4": { "App\\": "src/" } },
|
||||
"autoload-dev": { "psr-4": { "App\\Tests\\": "tests/" } }
|
||||
"autoload-dev": {
|
||||
"psr-4": { "App\\Tests\\": "tests/" },
|
||||
"files": ["tests/Support/InMemoryRepositories.php"]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1785
cloud/composer.lock
generated
Normal file
1785
cloud/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
namespace App\Tests;
|
||||
require_once __DIR__ . '/Support/InMemoryRepositories.php';
|
||||
use App\Tests\Support\{InMemoryNonceRepository, InMemoryEventRepository, InMemoryRateLimiter};
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue