public function ExtensionTest::testIsConfigEnabledReturnsTheResolvedValue in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php \Symfony\Component\DependencyInjection\Tests\Extension\ExtensionTest::testIsConfigEnabledReturnsTheResolvedValue()
@dataProvider getResolvedEnabledFixtures
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Extension/ ExtensionTest.php, line 19
Class
Namespace
Symfony\Component\DependencyInjection\Tests\ExtensionCode
public function testIsConfigEnabledReturnsTheResolvedValue($enabled) {
$pb = $this
->getMockBuilder('Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBag')
->setMethods(array(
'resolveValue',
))
->getMock();
$container = $this
->getMockBuilder('Symfony\\Component\\DependencyInjection\\ContainerBuilder')
->setMethods(array(
'getParameterBag',
))
->getMock();
$pb
->expects($this
->once())
->method('resolveValue')
->with($this
->equalTo($enabled))
->will($this
->returnValue($enabled));
$container
->expects($this
->once())
->method('getParameterBag')
->will($this
->returnValue($pb));
$extension = $this
->getMockBuilder('Symfony\\Component\\DependencyInjection\\Extension\\Extension')
->setMethods(array())
->getMockForAbstractClass();
$r = new \ReflectionMethod('Symfony\\Component\\DependencyInjection\\Extension\\Extension', 'isConfigEnabled');
$r
->setAccessible(true);
$r
->invoke($extension, $container, array(
'enabled' => $enabled,
));
}