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