class LegacyResolveParameterPlaceHoldersPassTest in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/LegacyResolveParameterPlaceHoldersPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\LegacyResolveParameterPlaceHoldersPassTest
@group legacy
Hierarchy
- class \Symfony\Component\DependencyInjection\Tests\Compiler\LegacyResolveParameterPlaceHoldersPassTest extends \Symfony\Component\DependencyInjection\Tests\Compiler\PHPUnit_Framework_TestCase
Expanded class hierarchy of LegacyResolveParameterPlaceHoldersPassTest
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Compiler/ LegacyResolveParameterPlaceHoldersPassTest.php, line 20
Namespace
Symfony\Component\DependencyInjection\Tests\CompilerView source
class LegacyResolveParameterPlaceHoldersPassTest extends \PHPUnit_Framework_TestCase {
public function testFactoryClassParametersShouldBeResolved() {
$this
->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
$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());
}
}