You are here

public function PhpArrayDumperTest::test_getArray 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_getArray()

@covers ::getArray

File

tests/src/DependencyInjection/Dumper/PhpArrayDumperTest.php, line 52
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_getArray() {
  $dump = $this->dumper
    ->getArray();
  $this
    ->assertTrue(is_array($dump));
  $this
    ->assertEquals($dump['aliases']['bar'], 'foo');
  $this
    ->assertEquals($dump['services']['foo'], array(
    'class' => 'My/Class',
    'arguments_count' => 0,
  ));
}