simplify autoload-dev to a single psr-4 autoload

v4
fadrian06 7 days ago
parent 4f6080f6f4
commit 450eea84ea

@ -35,16 +35,8 @@
} }
}, },
"autoload-dev": { "autoload-dev": {
"classmap": [
"tests/classes/"
],
"psr-4": { "psr-4": {
"Tests\\PHP8\\": [ "tests\\": "tests"
"tests/named-arguments"
],
"Tests\\Server\\": "tests/server",
"Tests\\ServerV2\\": "tests/server-v2",
"tests\\groupcompactsyntax\\": "tests/groupcompactsyntax"
} }
}, },
"require-dev": { "require-dev": {
@ -84,7 +76,7 @@
], ],
"test-server-v2": [ "test-server-v2": [
"echo \"Running Test Server\"", "echo \"Running Test Server\"",
"@php -S localhost:8000 -t tests/server-v2" "@php -S localhost:8000 -t tests/server_v2"
], ],
"test-coverage:win": [ "test-coverage:win": [
"del clover.xml", "del clover.xml",

@ -22,7 +22,7 @@
<testsuites> <testsuites>
<testsuite name="default"> <testsuite name="default">
<directory>tests/</directory> <directory>tests/</directory>
<exclude>tests/named-arguments/</exclude> <exclude>tests/named_arguments/</exclude>
</testsuite> </testsuite>
</testsuites> </testsuites>
<logging /> <logging />

@ -2,13 +2,10 @@
declare(strict_types=1); declare(strict_types=1);
namespace tests\groupcompactsyntax; namespace tests\group_compact_syntax;
use Flight; use Flight;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use tests\groupcompactsyntax\PostsController;
use tests\groupcompactsyntax\TodosController;
use tests\groupcompactsyntax\UsersController;
final class FlightRouteCompactSyntaxTest extends TestCase final class FlightRouteCompactSyntaxTest extends TestCase
{ {

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace tests\groupcompactsyntax; namespace tests\group_compact_syntax;
final class PostsController final class PostsController
{ {

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace tests\groupcompactsyntax; namespace tests\group_compact_syntax;
final class TodosController final class TodosController
{ {

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace tests\groupcompactsyntax; namespace tests\group_compact_syntax;
final class UsersController final class UsersController
{ {

@ -2,6 +2,8 @@
declare(strict_types=1); declare(strict_types=1);
namespace tests\named_arguments;
// phpcs:ignore PSR1.Classes.ClassDeclaration.MissingNamespace // phpcs:ignore PSR1.Classes.ClassDeclaration.MissingNamespace
class ExampleClass class ExampleClass
{ {

@ -2,10 +2,9 @@
declare(strict_types=1); declare(strict_types=1);
namespace Tests\PHP8; namespace tests\named_arguments;
use DateTimeImmutable; use DateTimeImmutable;
use ExampleClass;
use Flight; use Flight;
use flight\Container; use flight\Container;
use flight\Engine; use flight\Engine;

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace Tests\Server; namespace tests\server;
class AuthCheck class AuthCheck
{ {

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace Tests\Server; namespace tests\server;
use Flight; use Flight;

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace Tests\Server; namespace tests\server;
use Flight; use Flight;

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace Tests\Server; namespace tests\server;
class Pascal_Snake_Case // phpcs:ignore class Pascal_Snake_Case // phpcs:ignore
{ {

@ -7,10 +7,10 @@ use flight\core\Loader;
use flight\database\PdoWrapper; use flight\database\PdoWrapper;
use tests\classes\Container; use tests\classes\Container;
use tests\classes\ContainerDefault; use tests\classes\ContainerDefault;
use Tests\Server\AuthCheck; use tests\server\AuthCheck;
use Tests\Server\LayoutMiddleware; use tests\server\LayoutMiddleware;
use Tests\Server\OverwriteBodyMiddleware; use tests\server\OverwriteBodyMiddleware;
use Tests\Server\Pascal_Snake_Case; use tests\server\Pascal_Snake_Case;
/* /*
* This is the test file where we can open up a quick test server and make * This is the test file where we can open up a quick test server and make

@ -9,7 +9,7 @@ declare(strict_types=1);
* @author Kristaps Muižnieks https://github.com/krmu * @author Kristaps Muižnieks https://github.com/krmu
*/ */
namespace Tests\ServerV2 { namespace tests\server_v2 {
class AuthCheck class AuthCheck
{ {
public function before(): void public function before(): void
@ -23,7 +23,7 @@ namespace Tests\ServerV2 {
namespace { namespace {
use Tests\ServerV2\AuthCheck; use tests\server_v2\AuthCheck;
require_once __DIR__ . '/../phpunit_autoload.php'; require_once __DIR__ . '/../phpunit_autoload.php';
Loading…
Cancel
Save