You are here

class LegacyResolveParameterPlaceHoldersPassTest in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/dependency-injection/Tests/Compiler/LegacyResolveParameterPlaceHoldersPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\LegacyResolveParameterPlaceHoldersPassTest

@group legacy

Hierarchy

Expanded class hierarchy of LegacyResolveParameterPlaceHoldersPassTest

File

vendor/symfony/dependency-injection/Tests/Compiler/LegacyResolveParameterPlaceHoldersPassTest.php, line 20

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler
View source
class LegacyResolveParameterPlaceHoldersPassTest extends \PHPUnit_Framework_TestCase {
  public function testFactoryClassParametersShouldBeResolved() {
    $compilerPass = new ResolveParameterPlaceHoldersPass();
    $container = new ContainerBuilder();
    $container
      ->setParameter('foo.factory.class', 'FooFactory');
    $fooDefinition = $container
      ->register('foo', '%foo.factory.class%');
    $fooDefinition
      ->setFactoryClass('%foo.factory.class%');
    $compilerPass
      ->process($container);
    $fooDefinition = $container
      ->getDefinition('foo');
    $this
      ->assertSame('FooFactory', $fooDefinition
      ->getFactoryClass());
  }

}

Members