You are here

public function PhpArrayDumperTest::test_dump in Service Container 7

Same name and namespace in other branches
  1. 7.2 tests/src/DependencyInjection/Dumper/PhpArrayDumperTest.php \Drupal\Tests\service_container\DependencyInjection\Dumper\PhpArrayDumperTest::test_dump()

@covers ::dump

File

tests/src/DependencyInjection/Dumper/PhpArrayDumperTest.php, line 41
Contains \Drupal\Tests\service_container\DependencyInjection\Dumper\PhpArrayDumperTest

Class

PhpArrayDumperTest
@coversDefaultClass \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper @group dic

Namespace

Drupal\Tests\service_container\DependencyInjection\Dumper

Code

public function test_dump() {
  $dump = unserialize($this->dumper
    ->dump());
  $this
    ->assertTrue(is_array($dump));
  $this
    ->assertEquals($dump['aliases']['bar'], 'foo');
  $this
    ->assertEquals($dump['services']['foo'], array(
    'class' => 'My/Class',
    'arguments_count' => 0,
  ));
}