|
16 | 16 | use Symfony\Component\DependencyInjection\ContainerBuilder;
|
17 | 17 | use Symfony\Component\DependencyInjection\Reference;
|
18 | 18 | use Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass;
|
19 |
| -use Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy; |
| 19 | +use Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummyWithoutReturnTypes; |
20 | 20 | use Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy;
|
21 | 21 | use Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsVariadicsDummy;
|
22 | 22 | use Symfony\Component\DependencyInjection\Tests\Fixtures\SimilarArgumentsDummy;
|
@@ -120,16 +120,16 @@ public function testArgumentNotFound()
|
120 | 120 |
|
121 | 121 | /**
|
122 | 122 | * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
|
123 |
| - * @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. |
| 123 | + * @expectedExceptionMessage Invalid service "Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1": method "Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummyWithoutReturnTypes::createTestDefinition1()" has no argument named "$notFound". Check your service definition. |
124 | 124 | */
|
125 | 125 | public function testCorrectMethodReportedInException()
|
126 | 126 | {
|
127 | 127 | $container = new ContainerBuilder();
|
128 | 128 |
|
129 |
| - $container->register(FactoryDummy::class, FactoryDummy::class); |
| 129 | + $container->register(FactoryDummyWithoutReturnTypes::class, FactoryDummyWithoutReturnTypes::class); |
130 | 130 |
|
131 | 131 | $definition = $container->register(TestDefinition1::class, TestDefinition1::class);
|
132 |
| - $definition->setFactory(array(FactoryDummy::class, 'create')); |
| 132 | + $definition->setFactory(array(FactoryDummyWithoutReturnTypes::class, 'createTestDefinition1')); |
133 | 133 | $definition->setArguments(array('$notFound' => '123'));
|
134 | 134 |
|
135 | 135 | $pass = new ResolveNamedArgumentsPass();
|
|
0 commit comments