8000 [DependencyInjection] fix test · symfony/symfony@4d04a2d · GitHub
[go: up one dir, main page]

Skip to content

Commit 4d04a2d

Browse files
[DependencyInjection] fix test
1 parent 9f89250 commit 4d04a2d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ public function testEmptyBindingTypehint()
213213

214214
public function testIterableBindingTypehint()
215215
{
216+
$autoloader = static function ($class) {
217+
if ('iterable' === $class) {
218+
throw new \RuntimeException('We should not search pseudo-type iterable as class');
219+
}
220+
};
221+
spl_autoload_register($autoloader);
222+
216223
$container = new ContainerBuilder();
217224
$definition = $container->register('bar', NamedIterableArgumentDummy::class);
218225
$definition->setBindings([
@@ -222,5 +229,7 @@ public function testIterableBindingTypehint()
222229
$pass->process($container);
223230

224231
$this->assertInstanceOf(TaggedIteratorArgument::class, $container->getDefinition('bar')->getArgument(0));
232+
233+
spl_autoload_unregister($autoloader);
225234
}
226235
}

0 commit comments

Comments
 (0)
0