protected function OptimizedPhpArrayDumperTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest::setUp()
1 call to OptimizedPhpArrayDumperTest::setUp()
- PhpArrayDumperTest::setUp in core/
tests/ Drupal/ Tests/ Component/ DependencyInjection/ Dumper/ PhpArrayDumperTest.php
1 method overrides OptimizedPhpArrayDumperTest::setUp()
- PhpArrayDumperTest::setUp in core/
tests/ Drupal/ Tests/ Component/ DependencyInjection/ Dumper/ PhpArrayDumperTest.php
File
- core/
tests/ Drupal/ Tests/ Component/ DependencyInjection/ Dumper/ OptimizedPhpArrayDumperTest.php, line 65 - Contains \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest.
Class
- OptimizedPhpArrayDumperTest
- @coversDefaultClass \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper @group DependencyInjection
Namespace
Drupal\Tests\Component\DependencyInjection\DumperCode
protected function setUp() {
// Setup a mock container builder.
$this->containerBuilder = $this
->prophesize('\\Symfony\\Component\\DependencyInjection\\ContainerBuilder');
$this->containerBuilder
->getAliases()
->willReturn([]);
$this->containerBuilder
->getParameterBag()
->willReturn(new ParameterBag());
$this->containerBuilder
->getDefinitions()
->willReturn(NULL);
$this->containerBuilder
->isCompiled()
->willReturn(TRUE);
$definition = [];
$definition['aliases'] = [];
$definition['parameters'] = [];
$definition['services'] = [];
$definition['frozen'] = TRUE;
$definition['machine_format'] = $this->machineFormat;
$this->containerDefinition = $definition;
// Create the dumper.
$this->dumper = new $this->dumperClass($this->containerBuilder
->reveal());
}