Skip to content

Commit

Permalink
fix tests on PHP 5
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jan 5, 2019
1 parent 0a3d3d4 commit 6d84aeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -119,7 +119,7 @@ public function testArgumentNotFound()

/**
* @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()
{
Expand All @@ -128,7 +128,7 @@ public function testCorrectMethodReportedInException()
$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();
Expand Down
Expand Up @@ -33,6 +33,10 @@ public static function createSelf(): self
public static function createParent(): parent
{
}

public function createTestDefinition1()
{
}
}

class FactoryParent
Expand Down

0 comments on commit 6d84aeb

Please sign in to comment.