|
@@ -17,6 +17,7 @@ use Symfony\Component\DependencyInjection\Compiler\PassConfig;
|
|
|
use Sonata\AdminBundle\DependencyInjection\Compiler\AddDependencyCallsCompilerPass;
|
|
|
use Sonata\AdminBundle\DependencyInjection\Compiler\AddFilterTypeCompilerPass;
|
|
|
use Sonata\AdminBundle\DependencyInjection\Compiler\ExtensionCompilerPass;
|
|
|
+use Sonata\AdminBundle\DependencyInjection\Compiler\GlobalVariablesCompilerPass;
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
|
|
|
|
/**
|
|
@@ -30,7 +31,7 @@ class SonataAdminBundleTest extends \PHPUnit_Framework_TestCase
|
|
|
{
|
|
|
$containerBuilder = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder', array('addCompilerPass'));
|
|
|
|
|
|
- $containerBuilder->expects($this->exactly(3))
|
|
|
+ $containerBuilder->expects($this->exactly(4))
|
|
|
->method('addCompilerPass')
|
|
|
->will($this->returnCallback(function (CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION) {
|
|
|
if ($pass instanceof AddDependencyCallsCompilerPass) {
|
|
@@ -45,6 +46,10 @@ class SonataAdminBundleTest extends \PHPUnit_Framework_TestCase
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if ($pass instanceof GlobalVariablesCompilerPass) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
$this->fail(sprintf('Compiler pass is not one of the expected types. Expects "Sonata\AdminBundle\DependencyInjection\Compiler\AddDependencyCallsCompilerPass", "Sonata\AdminBundle\DependencyInjection\Compiler\AddFilterTypeCompilerPass" or "Sonata\AdminBundle\DependencyInjection\Compiler\ExtensionCompilerPass", but got "%s".', get_class($pass)));
|
|
|
}));
|
|
|
|