Ejemplo n.º 1
0
 /**
  * @covers Symfony\Components\DependencyInjection\ContainerBuilder::findAnnotatedServiceIds
  */
 public function testFindAnnotatedServiceIds()
 {
     $builder = new ContainerBuilder();
     $builder->register('foo', 'FooClass')->addAnnotation('foo', array('foo' => 'foo'))->addAnnotation('bar', array('bar' => 'bar'))->addAnnotation('foo', array('foofoo' => 'foofoo'));
     $this->assertEquals($builder->findAnnotatedServiceIds('foo'), array('foo' => array(array('foo' => 'foo'), array('foofoo' => 'foofoo'))), '->findAnnotatedServiceIds() returns an array of service ids and its annotation attributes');
     $this->assertEquals(array(), $builder->findAnnotatedServiceIds('foobar'), '->findAnnotatedServiceIds() returns an empty array if there is annotated services');
 }