Fix stuff
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
services:
|
|
||||||
Pcm\GeocodeBundle\Service\Geocoder:
|
|
||||||
autowire: true
|
|
||||||
public: true
|
|
||||||
@@ -7,6 +7,7 @@ namespace Pcm\GeocodeBundle\Tests;
|
|||||||
use Pcm\GeocodeBundle\PcmGeocodeBundle;
|
use Pcm\GeocodeBundle\PcmGeocodeBundle;
|
||||||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
||||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\HttpKernel\Kernel;
|
use Symfony\Component\HttpKernel\Kernel;
|
||||||
|
|
||||||
class AppKernel extends Kernel
|
class AppKernel extends Kernel
|
||||||
@@ -16,14 +17,10 @@ class AppKernel extends Kernel
|
|||||||
*/
|
*/
|
||||||
public function registerBundles(): array
|
public function registerBundles(): array
|
||||||
{
|
{
|
||||||
$bundles = array();
|
return [
|
||||||
|
new FrameworkBundle(),
|
||||||
if (in_array($this->getEnvironment(), array('test'))) {
|
new PcmGeocodeBundle()
|
||||||
$bundles[] = new FrameworkBundle();
|
];
|
||||||
$bundles[] = new PcmGeocodeBundle();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $bundles;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -31,6 +28,8 @@ class AppKernel extends Kernel
|
|||||||
*/
|
*/
|
||||||
public function registerContainerConfiguration(LoaderInterface $loader): void
|
public function registerContainerConfiguration(LoaderInterface $loader): void
|
||||||
{
|
{
|
||||||
$loader->load(__DIR__.'/config_'.$this->getEnvironment().'.yml');
|
$loader->load(function (ContainerBuilder $container) {
|
||||||
|
$container->prependExtensionConfig('framework', ['test' => true]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,6 +10,7 @@ use Pcm\GeocodeBundle\Service\Geocoder;
|
|||||||
use Pcm\GeocodeBundle\Tests\AppKernel;
|
use Pcm\GeocodeBundle\Tests\AppKernel;
|
||||||
use Pcm\GeocodeBundle\Trait\MappableTrait;
|
use Pcm\GeocodeBundle\Trait\MappableTrait;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||||
|
use Symfony\Component\HttpKernel\KernelInterface;
|
||||||
|
|
||||||
class GeocodeTest extends KernelTestCase
|
class GeocodeTest extends KernelTestCase
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user