8000 fix tests on PHP 5 · symfony/symfony@6d84aeb · GitHub
[go: up one dir, main page]

Skip to content

Commit 6d84aeb

Browse files
committed
fix tests on PHP 5
1 parent 0a3d3d4 commit 6d84aeb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveNamedArgumentsPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function testArgumentNotFound()
119119

120120
/**
121121
* @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
122-
* @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.
122+
* @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.
123123
*/
124124
public function testCorrectMethodReportedInException()
125125
{
@@ -128,7 +128,7 @@ public function testCorrectMethodReportedInException()
128128
$container->register(FactoryDummy::class, FactoryDummy::class);
129129

130130
$definition = $container->register(TestDefinition1::class, TestDefinition1::class);
131-
$definition->setFactory(array(FactoryDummy::class, 'create'));
131+
$definition->setFactory(array(FactoryDummy::class, 'createTestDefinition1'));
132132
$definition->setArguments(array('$notFound' => '123'));
133133

134134
$pass = new ResolveNamedArgumentsPass();

src/Symfony/Component/DependencyInjection/Tests/Fixtures/FactoryDummy.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ public static function createSelf(): self
3333
public static function createParent(): parent
3434
{
3535
}
36+
37+
public function createTestDefinition1()
38+
{
39+
}
3640
}
3741

3842
class FactoryParent

0 commit comments

Comments
 (0)
0