public function ContainerBuilderTest::testCreateServiceClass in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testCreateServiceClass()
@covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ ContainerBuilderTest.php, line 306
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testCreateServiceClass() {
$builder = new ContainerBuilder();
$builder
->register('foo1', '%class%');
$builder
->setParameter('class', 'stdClass');
$this
->assertInstanceOf('\\stdClass', $builder
->get('foo1'), '->createService() replaces parameters in the class provided by the service definition');
}