class PhpArrayDumperTest
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/PhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\PhpArrayDumperTest
- 8.9.x core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/PhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\PhpArrayDumperTest
- 11.x core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/PhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\PhpArrayDumperTest
@coversDefaultClass \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper @group DependencyInjection
Hierarchy
- class \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest extends \PHPUnit\Framework\TestCase uses \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Prophecy\PhpUnit\ProphecyTrait
- class \Drupal\Tests\Component\DependencyInjection\Dumper\PhpArrayDumperTest extends \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest
Expanded class hierarchy of PhpArrayDumperTest
File
-
core/
tests/ Drupal/ Tests/ Component/ DependencyInjection/ Dumper/ PhpArrayDumperTest.php, line 13
Namespace
Drupal\Tests\Component\DependencyInjection\DumperView source
class PhpArrayDumperTest extends OptimizedPhpArrayDumperTest {
/**
* {@inheritdoc}
*/
protected function setUp() : void {
$this->machineFormat = FALSE;
$this->dumperClass = '\\Drupal\\Component\\DependencyInjection\\Dumper\\PhpArrayDumper';
parent::setUp();
}
/**
* {@inheritdoc}
*/
protected static function serializeDefinition(array $service_definition) {
return $service_definition;
}
/**
* {@inheritdoc}
*/
protected static function getServiceCall($id, $invalid_behavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
if ($invalid_behavior !== ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
return sprintf('@?%s', $id);
}
return sprintf('@%s', $id);
}
/**
* {@inheritdoc}
*/
protected static function getParameterCall($name) {
return '%' . $name . '%';
}
/**
* {@inheritdoc}
*/
protected static function getCollection($collection, $resolve = TRUE) {
return $collection;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
OptimizedPhpArrayDumperTest::$containerBuilder | protected | property | The container builder instance. | |
OptimizedPhpArrayDumperTest::$containerDefinition | protected | property | The definition for the container to build in tests. | |
OptimizedPhpArrayDumperTest::$dumper | protected | property | The dumper instance. | |
OptimizedPhpArrayDumperTest::$dumperClass | protected | property | Stores the dumper class to use. | |
OptimizedPhpArrayDumperTest::$machineFormat | protected | property | Whether the dumper uses the machine-optimized format or not. | |
OptimizedPhpArrayDumperTest::getAliasesDataProvider | public static | function | Data provider for testGetAliases(). | |
OptimizedPhpArrayDumperTest::getDefinitionsDataProvider | public static | function | Data provider for testGetServiceDefinitions(). | |
OptimizedPhpArrayDumperTest::getIterator | protected static | function | Helper function to return a machine-optimized iterator. | |
OptimizedPhpArrayDumperTest::getParametersDataProvider | public static | function | Data provider for testGetParameters(). | |
OptimizedPhpArrayDumperTest::getPrivateServiceCall | protected static | function | Helper function to return a private service definition. | |
OptimizedPhpArrayDumperTest::getRaw | protected | function | Helper function to return a raw value definition. | |
OptimizedPhpArrayDumperTest::getServiceClosureCall | protected static | function | Helper function to return a service closure definition. | |
OptimizedPhpArrayDumperTest::percentsEscapeProvider | public static | function | Data provider for testPercentsEscape(). | |
OptimizedPhpArrayDumperTest::publicPrivateDataProvider | public static | function | ||
OptimizedPhpArrayDumperTest::testDumpForEmptyContainer | public | function | Tests that an empty container works properly. | |
OptimizedPhpArrayDumperTest::testGetAliases | public | function | Tests that alias processing works properly. | |
OptimizedPhpArrayDumperTest::testGetParameters | public | function | Tests that parameter processing works properly. | |
OptimizedPhpArrayDumperTest::testGetServiceDefinitionForDecoratedService | public | function | Tests that getDecoratedService() is unsupported. | |
OptimizedPhpArrayDumperTest::testGetServiceDefinitionForExpression | public | function | Tests that the correct RuntimeException is thrown for expressions. | |
OptimizedPhpArrayDumperTest::testGetServiceDefinitionForObject | public | function | Tests that the correct RuntimeException is thrown for dumping an object. | |
OptimizedPhpArrayDumperTest::testGetServiceDefinitionForObjectServiceId | public | function | Tests that the correct RuntimeException is thrown for dumping an object. | |
OptimizedPhpArrayDumperTest::testGetServiceDefinitionForResource | public | function | Tests that the correct RuntimeException is thrown for dumping a resource. | |
OptimizedPhpArrayDumperTest::testGetServiceDefinitions | public | function | Tests that service processing works properly. | |
OptimizedPhpArrayDumperTest::testGetServiceDefinitionWithReferenceToAlias | public | function | Tests that references to aliases work correctly. | |
OptimizedPhpArrayDumperTest::testPercentsEscape | public | function | Tests that service arguments with escaped percents are correctly dumped. | |
PhpArrayDumperTest::getCollection | protected static | function | Helper function to return a machine-optimized collection. | Overrides OptimizedPhpArrayDumperTest::getCollection |
PhpArrayDumperTest::getParameterCall | protected static | function | Helper function to return a parameter definition. | Overrides OptimizedPhpArrayDumperTest::getParameterCall |
PhpArrayDumperTest::getServiceCall | protected static | function | Helper function to return a service definition. | Overrides OptimizedPhpArrayDumperTest::getServiceCall |
PhpArrayDumperTest::serializeDefinition | protected static | function | Helper function to serialize a definition. | Overrides OptimizedPhpArrayDumperTest::serializeDefinition |
PhpArrayDumperTest::setUp | protected | function | Overrides OptimizedPhpArrayDumperTest::setUp |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.