You are here

public function ContainerBuilderTest::testCreateServiceClass in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testCreateServiceClass()

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

File

vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php, line 306

Class

ContainerBuilderTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

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