public function ContainerBuilderTest::testGetServiceIds

@covers Symfony\Component\DependencyInjection\ContainerBuilder::getServiceIds

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php, line 122

Class

ContainerBuilderTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testGetServiceIds() {
  $builder = new ContainerBuilder();
  $builder
    ->register('foo', 'stdClass');
  $builder->bar = $bar = new \stdClass();
  $builder
    ->register('bar', 'stdClass');
  $this
    ->assertEquals(array(
    'foo',
    'bar',
    'service_container',
  ), $builder
    ->getServiceIds(), '->getServiceIds() returns all defined service ids');
}