Skip to content

Commit 95fd077

Browse files
minor #23631 [DI] Fix test (nicolas-grekas)
This PR was merged into the 3.3 branch. Discussion ---------- [DI] Fix test | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - In php 5.5.9 (our lowest supported version), reflection says that the username argument is not optional (a bug that is fixed in 5.5.10 and up.) Commits ------- 70cc4e8 [DI] Fix test
2 parents 41bd1e5 + 70cc4e8 commit 95fd077

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -516,15 +516,15 @@ public function testOptionalArgsNoRequiredForCoreClasses()
516516
{
517517
$container = new ContainerBuilder();
518518

519-
$container->register('pdo_service', \PDO::class)
520-
->addArgument('sqlite:/foo.db')
519+
$container->register('foo', \SplFileObject::class)
520+
->addArgument('foo.txt')
521521
->setAutowired(true);
522522

523523
(new AutowirePass())->process($container);
524524

525-
$definition = $container->getDefinition('pdo_service');
525+
$definition = $container->getDefinition('foo');
526526
$this->assertEquals(
527-
array('sqlite:/foo.db'),
527+
array('foo.txt'),
528528
$definition->getArguments()
529529
);
530530
}

0 commit comments

Comments
 (0)