You are here

public function CheckDefinitionValidityPassTest::testLegacyProcessDetectsBothFactorySyntaxesUsed in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\CheckDefinitionValidityPassTest::testLegacyProcessDetectsBothFactorySyntaxesUsed()

@expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException @group legacy

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php, line 57

Class

CheckDefinitionValidityPassTest

Namespace

Symfony\Component\DependencyInjection\Tests\Compiler

Code

public function testLegacyProcessDetectsBothFactorySyntaxesUsed() {
  $this
    ->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
  $container = new ContainerBuilder();
  $container
    ->register('a')
    ->setFactory(array(
    'a',
    'b',
  ))
    ->setFactoryClass('a');
  $this
    ->process($container);
}