From 559fae430f93b75ca44c05bfc895f7c8a3bdebdc Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle Date: Tue, 10 Dec 2024 09:59:47 +0100 Subject: [PATCH] fix: service configuration loading and unit tests Signed-off-by: Patrizio Bekerle --- ...n.php => DbpRelayVerityConnectorVerapdfExtension.php} | 9 +++++---- tests/Kernel.php | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) rename src/DependencyInjection/{DbpRelayVerityConnectorVerapdfBundleExtension.php => DbpRelayVerityConnectorVerapdfExtension.php} (67%) diff --git a/src/DependencyInjection/DbpRelayVerityConnectorVerapdfBundleExtension.php b/src/DependencyInjection/DbpRelayVerityConnectorVerapdfExtension.php similarity index 67% rename from src/DependencyInjection/DbpRelayVerityConnectorVerapdfBundleExtension.php rename to src/DependencyInjection/DbpRelayVerityConnectorVerapdfExtension.php index 3a7fa1a..e4ba2da 100644 --- a/src/DependencyInjection/DbpRelayVerityConnectorVerapdfBundleExtension.php +++ b/src/DependencyInjection/DbpRelayVerityConnectorVerapdfExtension.php @@ -5,13 +5,13 @@ namespace Dbp\Relay\VerityConnectorVerapdfBundle\DependencyInjection; use Dbp\Relay\CoreBundle\Extension\ExtensionTrait; -use Dbp\Relay\VerityBundle\Service\ConfigurationService; +//use Dbp\Relay\VerityBundle\Service\ConfigurationService; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension; -class DbpRelayVerityConnectorVerapdfBundleExtension extends ConfigurableExtension +class DbpRelayVerityConnectorVerapdfExtension extends ConfigurableExtension { use ExtensionTrait; @@ -23,7 +23,8 @@ public function loadInternal(array $mergedConfig, ContainerBuilder $container): ); $loader->load('services.yaml'); - $definition = $container->getDefinition(ConfigurationService::class); - $definition->addMethodCall('setConfig', [$mergedConfig]); + // TODO: Implement service configuration +// $definition = $container->getDefinition(ConfigurationService::class); +// $definition->addMethodCall('setConfig', [$mergedConfig]); } } diff --git a/tests/Kernel.php b/tests/Kernel.php index 1e67883..0c06128 100644 --- a/tests/Kernel.php +++ b/tests/Kernel.php @@ -48,6 +48,9 @@ protected function configureContainer(ContainerConfigurator $container, LoaderIn 'annotations' => false, ]); - $container->extension('dbp_verity_connector_verapdf', []); + $container->extension('dbp_relay_verity_connector_verapdf', [ + 'url' => 'http://localhost:8080', + 'maxsize' => '1000000', + ]); } }