From cc2bd529d217cf8185332c30687ef0eb4ab3da37 Mon Sep 17 00:00:00 2001 From: Brabli <67018167+Brabli@users.noreply.github.com> Date: Wed, 20 Jul 2022 21:57:48 +0100 Subject: [PATCH] Get tests working again --- config/services.yml | 4 ++-- tests/AppKernel.php | 3 ++- tests/Service/GeocodeTest.php | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/services.yml b/config/services.yml index 5deb4a0..8fbf795 100644 --- a/config/services.yml +++ b/config/services.yml @@ -1,4 +1,4 @@ services: Pcm\GeocodeBundle\Service\Geocoder: - public: true - class: Pcm\GeocodeBundle\Service\Geocoder \ No newline at end of file + autowire: true + public: true \ No newline at end of file diff --git a/tests/AppKernel.php b/tests/AppKernel.php index 3e0dc37..b3186a8 100644 --- a/tests/AppKernel.php +++ b/tests/AppKernel.php @@ -29,8 +29,9 @@ class AppKernel extends Kernel /** * @param LoaderInterface $loader */ - public function registerContainerConfiguration(LoaderInterface $loader) + public function registerContainerConfiguration(LoaderInterface $loader): void { + dump(__DIR__.'/config_'.$this->getEnvironment().'.yml'); $loader->load(__DIR__.'/config_'.$this->getEnvironment().'.yml'); } } \ No newline at end of file diff --git a/tests/Service/GeocodeTest.php b/tests/Service/GeocodeTest.php index c880bf4..bb43714 100644 --- a/tests/Service/GeocodeTest.php +++ b/tests/Service/GeocodeTest.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Pcm\GeocodeBundle\Tests; +use Pcm\GeocodeBundle\Data\LatLon; use Pcm\GeocodeBundle\Interface\MappableInterface; use Pcm\GeocodeBundle\Service\Geocoder; use Pcm\GeocodeBundle\Tests\AppKernel; @@ -19,7 +20,7 @@ class GeocodeTest extends KernelTestCase protected function setUp(): void { - $kernel = new AppKernel('test', false); + $kernel = new AppKernel('test', true); $kernel->boot(); $this->geocoder = $kernel->getContainer()->get(Geocoder::class);