diff --git a/tests/TestKernel.php b/tests/TestKernel.php index 5a6e84cc..49b0e1ec 100644 --- a/tests/TestKernel.php +++ b/tests/TestKernel.php @@ -84,25 +84,25 @@ public function registerContainerConfiguration(LoaderInterface $loader) $loader->load(function (ContainerBuilder $container) { $container->loadFromExtension('doctrine', [ 'dbal' => [ - 'driver' => 'sqlite', - 'charset' => 'utf8mb4', - 'url' => 'sqlite:///:memory:', + 'driver' => 'sqlite', + 'charset' => 'utf8mb4', + 'url' => 'sqlite:///:memory:', 'default_table_options' => [ - 'charset' => 'utf8mb4', + 'charset' => 'utf8mb4', 'utf8mb4_unicode_ci' => 'utf8mb4_unicode_ci', ], - 'platform_service' => SqlitePlatform::class, + 'platform_service' => SqlitePlatform::class, ], - 'orm' => null, + 'orm' => null, ]); $container->loadFromExtension('framework', [ 'secret' => 'nope', - 'test' => null, + 'test' => null, 'router' => [ 'resource' => __DIR__ . '/Fixtures/routes.php', - 'type' => 'php', - 'utf8' => true, + 'type' => 'php', + 'utf8' => true, ], ]); @@ -115,16 +115,16 @@ public function registerContainerConfiguration(LoaderInterface $loader) $container->loadFromExtension('security', [ 'enable_authenticator_manager' => true, - 'firewalls' => [ + 'firewalls' => [ 'test' => [ - 'provider' => 'in_memory', - 'pattern' => '^/security-test', + 'provider' => 'in_memory', + 'pattern' => '^/security-test', 'stateless' => true, - 'oauth2' => true, + 'oauth2' => true, ], ], - 'providers' => [ - 'in_memory' => [ + 'providers' => [ + 'in_memory' => [ 'memory' => [ 'users' => [ FixtureFactory::FIXTURE_USER => [ @@ -147,18 +147,18 @@ public function registerContainerConfiguration(LoaderInterface $loader) $container->loadFromExtension('league_oauth2_server', [ 'authorization_server' => [ - 'private_key' => '%env(PRIVATE_KEY_PATH)%', + 'private_key' => '%env(PRIVATE_KEY_PATH)%', 'encryption_key' => '%env(ENCRYPTION_KEY)%', ], - 'resource_server' => [ + 'resource_server' => [ 'public_key' => '%env(PUBLIC_KEY_PATH)%', ], - 'scopes' => [ + 'scopes' => [ 'available' => [ FixtureFactory::FIXTURE_SCOPE_FIRST, FixtureFactory::FIXTURE_SCOPE_SECOND, ], - 'default' => [ + 'default' => [ FixtureFactory::FIXTURE_SCOPE_SECOND, ], ], @@ -176,23 +176,28 @@ private function exposeManagerServices(ContainerBuilder $container): void { $container ->getAlias(ScopeManagerInterface::class) - ->setPublic(true); + ->setPublic(true) + ; $container ->getAlias(ClientManagerInterface::class) - ->setPublic(true); + ->setPublic(true) + ; $container ->getAlias(AccessTokenManagerInterface::class) - ->setPublic(true); + ->setPublic(true) + ; $container ->getAlias(RefreshTokenManagerInterface::class) - ->setPublic(true); + ->setPublic(true) + ; $container ->getAlias(AuthorizationCodeManagerInterface::class) - ->setPublic(true); + ->setPublic(true) + ; } private function configureControllers(ContainerBuilder $container): void @@ -200,7 +205,8 @@ private function configureControllers(ContainerBuilder $container): void $container ->register(SecurityTestController::class) ->setAutoconfigured(true) - ->setAutowired(true); + ->setAutowired(true) + ; } private function configureDatabaseServices(ContainerBuilder $container): void @@ -208,7 +214,8 @@ private function configureDatabaseServices(ContainerBuilder $container): void $container ->register(SqlitePlatform::class) ->setAutoconfigured(true) - ->setAutowired(true); + ->setAutowired(true) + ; } private function configureCustomPersistenceServices(ContainerBuilder $container): void