diff --git a/core/lib/Drupal/Component/DependencyInjection/Container.php b/core/lib/Drupal/Component/DependencyInjection/Container.php index aef2323..1640565 100644 --- a/core/lib/Drupal/Component/DependencyInjection/Container.php +++ b/core/lib/Drupal/Component/DependencyInjection/Container.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\DependencyInjection\Container. + * Contains \Drupal\Component\DependencyInjection\Container. */ -namespace Drupal\Core\DependencyInjection; +namespace Drupal\Component\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\IntrospectableContainerInterface; @@ -27,10 +27,9 @@ * It is based on a PHP array container definition dumped as a * performance-optimized machine-readable format. * - * The best way to initialize this container is to use a - * \Drupal\Core\DependencyInjection\ContainerBuilder, compile it and then - * retrieve the definition via - * \Drupal\Core\DependencyInjection\Dumper\OptimizedPhpArrayDumper::getArray(). + * The best way to initialize this container is to use a Container Builder, + * compile it and then retrieve the definition via + * \Drupal\Compontent\DependencyInjection\Dumper\OptimizedPhpArrayDumper::getArray(). * * The retrieved array can be cached safely and then passed to this container * via the constructor. @@ -53,12 +52,6 @@ * - Synchronized services are explicitly not supported, because Symfony 2.8 has * deprecated them and they will be removed in Symfony 3.0. * - * Drupal specifically does not allow serializing the container and any service - * that is set dynamically gets a _serviceID property, so serialization via a - * trait can be supported by some services. - * - * @see \Drupal\Core\DependencyInjection\DependencySerializationTrait - * * @ingroup container */ class Container implements IntrospectableContainerInterface { @@ -129,7 +122,7 @@ class Container implements IntrospectableContainerInterface { */ public function __construct(array $container_definition = array()) { if (!empty($container_definition) && (!isset($container_definition['machine_format']) || $container_definition['machine_format'] !== TRUE)) { - throw new InvalidArgumentException('The non-optimized format is not supported by this class. Use an optimized machine-readable format instead, e.g. as produced by \Drupal\Core\DependencyInjection\Dumper\OptimizedPhpArrayDumper.'); + throw new InvalidArgumentException('The non-optimized format is not supported by this class. Use an optimized machine-readable format instead, e.g. as produced by \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper.'); } $this->aliases = isset($container_definition['aliases']) ? $container_definition['aliases'] : array(); @@ -362,9 +355,6 @@ protected function createService(array $definition, $id) { * {@inheritdoc} */ public function set($id, $service, $scope = self::SCOPE_CONTAINER) { - if (isset($service) && is_object($service)) { - $service->_serviceId = $id; - } $this->services[$id] = $service; } @@ -621,14 +611,6 @@ public function isScopeActive($name) { } /** - * {@inheritdoc} - */ - public function __sleep() { - trigger_error('The container was serialized.', E_USER_ERROR); - return array_keys(get_object_vars($this)); - } - - /** * Gets all defined service IDs. * * @return array diff --git a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php index dcf7227..feca524 100644 --- a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php +++ b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\DependencyInjection\Dumper\OptimizedPhpArrayDumper. + * Contains \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper. */ -namespace Drupal\Core\DependencyInjection\Dumper; +namespace Drupal\Component\DependencyInjection\Dumper; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -34,9 +34,9 @@ * still be retrieved via get() from the container. * * It is machine-optimized, for a human-readable version based on this one see - * \Drupal\Core\DependencyInjection\Dumper\PhpArrayDumper. + * \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper. * - * @see \Drupal\Core\DependecyInjection\Container + * @see \Drupal\Component\DependecyInjection\Container */ class OptimizedPhpArrayDumper extends Dumper { diff --git a/core/lib/Drupal/Component/DependencyInjection/Dumper/PhpArrayDumper.php b/core/lib/Drupal/Component/DependencyInjection/Dumper/PhpArrayDumper.php index c22580b..287eaa1 100644 --- a/core/lib/Drupal/Component/DependencyInjection/Dumper/PhpArrayDumper.php +++ b/core/lib/Drupal/Component/DependencyInjection/Dumper/PhpArrayDumper.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\DependencyInjection\Dumper\PhpArrayDumper. + * Contains \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper. */ -namespace Drupal\Core\DependencyInjection\Dumper; +namespace Drupal\Component\DependencyInjection\Dumper; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -17,9 +17,9 @@ * YAML strings. * * It is human readable, for a machine-optimized version based on this one see - * \Drupal\Core\DependencyInjection\Dumper\OptimizedPhpArrayDumper. + * \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper. * - * @see \Drupal\Core\DependencyInjection\PhpArrayContainer + * @see \Drupal\Component\DependencyInjection\PhpArrayContainer */ class PhpArrayDumper extends OptimizedPhpArrayDumper { diff --git a/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php b/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php index 2de82b0..69da990 100644 --- a/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php +++ b/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php @@ -1,10 +1,10 @@ id; diff --git a/core/lib/Drupal/Core/DependencyInjection/Container.php b/core/lib/Drupal/Core/DependencyInjection/Container.php index 4e28d54..b58b726 100644 --- a/core/lib/Drupal/Core/DependencyInjection/Container.php +++ b/core/lib/Drupal/Core/DependencyInjection/Container.php @@ -7,17 +7,17 @@ namespace Drupal\Core\DependencyInjection; -use Symfony\Component\DependencyInjection\Container as SymfonyContainer; +use Drupal\Component\DependencyInjection\Container as DrupalContainer; /** - * Extends the symfony container to set the service ID on the created object. + * Extends the drupal container to set the service ID on the created object. */ -class Container extends SymfonyContainer { +class Container extends DrupalContainer { /** * {@inheritdoc} */ - public function set($id, $service, $scope = SymfonyContainer::SCOPE_CONTAINER) { + public function set($id, $service, $scope = DrupalContainer::SCOPE_CONTAINER) { parent::set($id, $service, $scope); // Ensure that the _serviceId property is set on synthetic services as well. diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index 2dd59ce..cb11be7 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -59,7 +59,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { * * @var string */ - protected $phpArrayDumperClass = '\Drupal\Core\DependencyInjection\Dumper\OptimizedPhpArrayDumper'; + protected $phpArrayDumperClass = '\Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper'; /** * Holds the default bootstrap container definition. @@ -90,7 +90,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { * * @var string */ - protected $bootstrapContainerClass = '\Drupal\Core\DependencyInjection\PhpArrayContainer'; + protected $bootstrapContainerClass = '\Drupal\Component\DependencyInjection\PhpArrayContainer'; /** * Holds the bootstrap container. diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php index f4d05e9..78c3be2 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php @@ -2,17 +2,17 @@ /** * @file - * Contains \Drupal\Tests\Core\DependencyInjection\ContainerTest. + * Contains \Drupal\Tests\Component\DependencyInjection\ContainerTest. */ -namespace Drupal\Tests\Core\DependencyInjection; +namespace Drupal\Tests\Component\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Exception\LogicException; use Prophecy\Argument; /** - * @coversDefaultClass \Drupal\Core\DependencyInjection\Container + * @coversDefaultClass \Drupal\Component\DependencyInjection\Container * @group DependencyInjection */ class ContainerTest extends \PHPUnit_Framework_TestCase { @@ -20,7 +20,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase { /** * The tested container. * - * @var \Drupal\Core\DependencyInjection\ContainerInterface + * @var \Symfony\Component\DependencyInjection\ContainerInterface */ protected $container; @@ -47,7 +47,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase { public function setUp() { $this->machineFormat = TRUE; - $this->containerClass = '\Drupal\Core\DependencyInjection\Container'; + $this->containerClass = '\Drupal\Component\DependencyInjection\Container'; $this->containerDefinition = $this->getMockContainerDefinition(); $this->container = new $this->containerClass($this->containerDefinition); } @@ -201,19 +201,6 @@ public function testSet() { } /** - * Tests that set services have the right _serviceId property. - * - * @covers ::set - */ - public function testSetHasServiceIdProperty() { - $container = new $this->containerClass(); - $class = new MockService(); - $container->set('bar', $class); - // Ensure that _serviceId is set on the object. - $this->assertEquals('bar', $class->_serviceId); - } - - /** * Tests that Container::has() works properly. * * @covers ::has @@ -513,7 +500,7 @@ public function testGetForConfigurator() { $container = $this->container; // Setup a configurator. - $configurator = $this->prophesize('\Drupal\Tests\Core\DependencyInjection\MockConfiguratorInterface'); + $configurator = $this->prophesize('\Drupal\Tests\Component\DependencyInjection\MockConfiguratorInterface'); $configurator->configureService(Argument::type('object')) ->shouldBeCalled(1) ->will(function($args) use ($container) { @@ -692,37 +679,6 @@ public function scopeExceptionTestProvider() { } /** - * Tests that __sleep throws an Exception. - * - * @covers ::__sleep - * - * @expectedException \PHPUnit_Framework_Error - */ - public function testSleepWithException() { - $serialized = serialize($this->container); - } - - /** - * Tests that __sleep works when error handler is set to non-fatal. - * - * @covers ::__sleep - */ - public function testSleepWithIgnoredErrors() { - $container = new $this->containerClass(); - - // Ignore any errors. - set_error_handler(array($this, 'ignoreErrorHandler')); - $serialized = serialize($container); - restore_error_handler(); - } - - /** - * An error handler that ignores all errors. - */ - public function ignoreErrorHandler() { - } - - /** * Tests that Container::getServiceIds() works properly. * * @covers ::getServiceIds @@ -776,7 +732,7 @@ protected function getMockContainerDefinition() { 'class' => get_class($fake_service), ); $services['service.provider'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( $this->getServiceCall('other.service'), $this->getParameterCall('some_config'), @@ -796,7 +752,7 @@ protected function getMockContainerDefinition() { // Test private services. $private_service = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( $this->getServiceCall('other.service'), $this->getParameterCall('some_private_config'), @@ -805,14 +761,14 @@ protected function getMockContainerDefinition() { ); $services['service_using_private'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( $this->getPrivateServiceCall(NULL, $private_service), $this->getParameterCall('some_config'), )), ); $services['another_service_using_private'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( $this->getPrivateServiceCall(NULL, $private_service), $this->getParameterCall('some_config'), @@ -824,14 +780,14 @@ protected function getMockContainerDefinition() { $id = 'private_service_shared_1'; $services['service_using_shared_private'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( $this->getPrivateServiceCall($id, $private_service, TRUE), $this->getParameterCall('some_config'), )), ); $services['another_service_using_shared_private'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( $this->getPrivateServiceCall($id, $private_service, TRUE), $this->getParameterCall('some_config'), @@ -840,7 +796,7 @@ protected function getMockContainerDefinition() { // Tests service with invalid argument. $services['invalid_argument_service'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( 1, // Test passing non-strings, too. (object) array( @@ -850,7 +806,7 @@ protected function getMockContainerDefinition() { ); $services['invalid_arguments_service'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => (object) array( 'type' => 'invalid', ), @@ -858,7 +814,7 @@ protected function getMockContainerDefinition() { // Test service that needs deep-traversal. $services['service_using_array'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( $this->getCollection(array( $this->getServiceCall('other.service'), @@ -868,7 +824,7 @@ protected function getMockContainerDefinition() { ); $services['service_with_optional_dependency'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( $this->getServiceCall('service.does_not_exist', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->getParameterCall('some_private_config'), @@ -888,9 +844,9 @@ protected function getMockContainerDefinition() { ); $services['factory_class'] = array( 'class' => '\Drupal\service_container\ServiceContainer\ControllerInterface', - 'factory' => '\Drupal\Tests\Core\DependencyInjection\MockService::getFactoryMethod', + 'factory' => '\Drupal\Tests\Component\DependencyInjection\MockService::getFactoryMethod', 'arguments' => array( - '\Drupal\Tests\Core\DependencyInjection\MockService', + '\Drupal\Tests\Component\DependencyInjection\MockService', array(NULL, 'bar'), ), 'calls' => array( @@ -906,7 +862,7 @@ protected function getMockContainerDefinition() { ); $services['circular_dependency'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( $this->getServiceCall('circular_dependency'), )), @@ -923,7 +879,7 @@ protected function getMockContainerDefinition() { $args = array(); for ($i=0; $i < 12; $i++) { $services['service_test_instantiation_' . $i] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockInstantiationService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockInstantiationService', // Also test a collection that does not need resolving. 'arguments' => $this->getCollection($args, FALSE), ); @@ -931,14 +887,14 @@ protected function getMockContainerDefinition() { } $services['service_parameter_not_exists'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( $this->getServiceCall('service.provider'), $this->getParameterCall('not_exists'), )), ); $services['service_dependency_not_exists'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( $this->getServiceCall('service_not_exists'), $this->getParameterCall('some_config'), @@ -946,7 +902,7 @@ protected function getMockContainerDefinition() { ); $services['service_with_parameter_service'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => $this->getCollection(array( $this->getParameterCall('service_from_parameter'), // Also test deep collections that don't need resolving. @@ -966,7 +922,7 @@ protected function getMockContainerDefinition() { 'synthetic' => TRUE, ); $services['configurable_service'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => array(), 'configurator' => array( $this->getServiceCall('configurator'), @@ -974,7 +930,7 @@ protected function getMockContainerDefinition() { ), ); $services['configurable_service_exception'] = array( - 'class' => '\Drupal\Tests\Core\DependencyInjection\MockService', + 'class' => '\Drupal\Tests\Component\DependencyInjection\MockService', 'arguments' => array(), 'configurator' => 'configurator_service_test_does_not_exist', ); diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php index 5659108..76473a5 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Tests\Core\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest. + * Contains \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest. */ -namespace Drupal\Tests\Core\DependencyInjection\Dumper { +namespace Drupal\Tests\Component\DependencyInjection\Dumper { use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; @@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** - * @coversDefaultClass \Drupal\Core\DependencyInjection\Dumper\OptimizedPhpArrayDumper + * @coversDefaultClass \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper * @group DependencyInjection */ class OptimizedPhpArrayDumperTest extends \PHPUnit_Framework_TestCase { @@ -32,7 +32,7 @@ class OptimizedPhpArrayDumperTest extends \PHPUnit_Framework_TestCase { * * @var string */ - protected $dumperClass = '\Drupal\Core\DependencyInjection\Dumper\OptimizedPhpArrayDumper'; + protected $dumperClass = '\Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper'; /** * {@inheritdoc} diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/PhpArrayDumperTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/PhpArrayDumperTest.php index 79af002..55e9a5f 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/PhpArrayDumperTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/PhpArrayDumperTest.php @@ -2,15 +2,15 @@ /** * @file - * Contains \Drupal\Tests\Core\DependencyInjection\Dumper\PhpArrayDumperTest. + * Contains \Drupal\Tests\Component\DependencyInjection\Dumper\PhpArrayDumperTest. */ -namespace Drupal\Tests\Core\DependencyInjection\Dumper; +namespace Drupal\Tests\Component\DependencyInjection\Dumper; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * @coversDefaultClass \Drupal\Core\DependencyInjection\Dumper\PhpArrayDumper + * @coversDefaultClass \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper * @group DependencyInjection */ class PhpArrayDumperTest extends OptimizedPhpArrayDumperTest { @@ -20,7 +20,7 @@ class PhpArrayDumperTest extends OptimizedPhpArrayDumperTest { */ public function setUp() { $this->machineFormat = FALSE; - $this->dumperClass = '\Drupal\Core\DependencyInjection\Dumper\PhpArrayDumper'; + $this->dumperClass = '\Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper'; parent::setUp(); } diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/container_test_file_service_test_service_function.data b/core/tests/Drupal/Tests/Component/DependencyInjection/Fixture/container_test_file_service_test_service_function.data similarity index 100% rename from core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/container_test_file_service_test_service_function.data rename to core/tests/Drupal/Tests/Component/DependencyInjection/Fixture/container_test_file_service_test_service_function.data diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/PhpArrayContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/PhpArrayContainerTest.php index 1fad50d..8ad93b3 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/PhpArrayContainerTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/PhpArrayContainerTest.php @@ -2,16 +2,16 @@ /** * @file - * Contains \Drupal\Tests\Core\DependencyInjection\PhpArrayContainerTest. + * Contains \Drupal\Tests\Component\DependencyInjection\PhpArrayContainerTest. */ -namespace Drupal\Tests\Core\DependencyInjection; +namespace Drupal\Tests\Component\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Exception\LogicException; /** - * @coversDefaultClass \Drupal\Core\DependencyInjection\PhpArrayContainer + * @coversDefaultClass \Drupal\Component\DependencyInjection\PhpArrayContainer * @group DependencyInjection */ class PhpArrayContainerTest extends ContainerTest { @@ -21,7 +21,7 @@ class PhpArrayContainerTest extends ContainerTest { */ public function setUp() { $this->machineFormat = FALSE; - $this->containerClass = '\Drupal\Core\DependencyInjection\PhpArrayContainer'; + $this->containerClass = '\Drupal\Component\DependencyInjection\PhpArrayContainer'; $this->containerDefinition = $this->getMockContainerDefinition(); $this->container = new $this->containerClass($this->containerDefinition); }