You are here

public function OptimizedPhpArrayDumperTest::testDumpForEmptyContainer in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest::testDumpForEmptyContainer()
  2. 9 core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest::testDumpForEmptyContainer()

Tests that an empty container works properly.

@covers ::dump @covers ::getArray @covers ::supportsMachineFormat

File

core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php, line 96
Contains \Drupal\Tests\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumperTest.

Class

OptimizedPhpArrayDumperTest
@coversDefaultClass \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper @group DependencyInjection

Namespace

Drupal\Tests\Component\DependencyInjection\Dumper

Code

public function testDumpForEmptyContainer() {
  $serialized_definition = $this->dumper
    ->dump();
  $this
    ->assertEquals(serialize($this->containerDefinition), $serialized_definition);
}