fix tests on PHP 5
This commit is contained in:
parent
0a3d3d4dff
commit
6d84aeb131
@ -119,7 +119,7 @@ class ResolveNamedArgumentsPassTest extends TestCase
|
||||
|
||||
/**
|
||||
* @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
|
||||
* @expectedExceptionMessage Invalid service "Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1": method "Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy::create()" has no argument named "$notFound". Check your service definition.
|
||||
* @expectedExceptionMessage Invalid service "Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1": method "Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy::createTestDefinition1()" has no argument named "$notFound". Check your service definition.
|
||||
*/
|
||||
public function testCorrectMethodReportedInException()
|
||||
{
|
||||
@ -128,7 +128,7 @@ class ResolveNamedArgumentsPassTest extends TestCase
|
||||
$container->register(FactoryDummy::class, FactoryDummy::class);
|
||||
|
||||
$definition = $container->register(TestDefinition1::class, TestDefinition1::class);
|
||||
$definition->setFactory(array(FactoryDummy::class, 'create'));
|
||||
$definition->setFactory(array(FactoryDummy::class, 'createTestDefinition1'));
|
||||
$definition->setArguments(array('$notFound' => '123'));
|
||||
|
||||
$pass = new ResolveNamedArgumentsPass();
|
||||
|
@ -33,6 +33,10 @@ class FactoryDummy extends FactoryParent
|
||||
public static function createParent(): parent
|
||||
{
|
||||
}
|
||||
|
||||
public function createTestDefinition1()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class FactoryParent
|
||||
|
Reference in New Issue
Block a user