Get tests working again

This commit is contained in:
Brabli
2022-07-20 21:57:48 +01:00
parent bebb5f09e2
commit cc2bd529d2
3 changed files with 6 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
services:
Pcm\GeocodeBundle\Service\Geocoder:
public: true
class: Pcm\GeocodeBundle\Service\Geocoder
autowire: true
public: true

View File

@@ -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');
}
}

View File

@@ -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);