You are here

class PhpArrayDumperTest in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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 \Drupal\Tests\Component\DependencyInjection\Dumper\PHPUnit_Framework_TestCase

Expanded class hierarchy of PhpArrayDumperTest

File

core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/PhpArrayDumperTest.php, line 16
Contains \Drupal\Tests\Component\DependencyInjection\Dumper\PhpArrayDumperTest.

Namespace

Drupal\Tests\Component\DependencyInjection\Dumper
View source
class PhpArrayDumperTest extends OptimizedPhpArrayDumperTest {

  /**
   * {@inheritdoc}
   */
  public function setUp() {
    $this->machineFormat = FALSE;
    $this->dumperClass = '\\Drupal\\Component\\DependencyInjection\\Dumper\\PhpArrayDumper';
    parent::setUp();
  }

  /**
   * {@inheritdoc}
   */
  protected function serializeDefinition(array $service_definition) {
    return $service_definition;
  }

  /**
   * {@inheritdoc}
   */
  protected 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 function getParameterCall($name) {
    return '%' . $name . '%';
  }

  /**
   * {@inheritdoc}
   */
  protected function getCollection($collection, $resolve = TRUE) {
    return $collection;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
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 function Data provider for testGetAliases().
OptimizedPhpArrayDumperTest::getDefinitionsDataProvider public function Data provider for testGetServiceDefinitions().
OptimizedPhpArrayDumperTest::getParametersDataProvider public function Data provider for testGetParameters().
OptimizedPhpArrayDumperTest::getPrivateServiceCall protected function Helper function to return a private service definition.
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::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::testGetServiceDefinitionWithInvalidScope public function Tests that the correct InvalidArgumentException is thrown for getScope().
PhpArrayDumperTest::getCollection protected function Helper function to return a machine-optimized collection. Overrides OptimizedPhpArrayDumperTest::getCollection
PhpArrayDumperTest::getParameterCall protected function Helper function to return a parameter definition. Overrides OptimizedPhpArrayDumperTest::getParameterCall
PhpArrayDumperTest::getServiceCall protected function Helper function to return a service definition. Overrides OptimizedPhpArrayDumperTest::getServiceCall
PhpArrayDumperTest::serializeDefinition protected function Helper function to serialize a definition. Overrides OptimizedPhpArrayDumperTest::serializeDefinition
PhpArrayDumperTest::setUp public function Overrides OptimizedPhpArrayDumperTest::setUp