You are here

public function ContainerBuilderTest::testGetServiceIds in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testGetServiceIds()

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

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php, line 168

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');
}