Skip to content

Commit f394a26

Browse files
minor #61314 [FrameworkBundle] fix low deps tests (xabbuh)
This PR was merged into the 7.4 branch. Discussion ---------- [FrameworkBundle] fix low deps tests | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT follows #61306 as the added test case requires the changes from #60597 to be present Commits ------- b336103 fix low deps tests
2 parents 6ad5456 + b336103 commit f394a26

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerLintCommandTest.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Bundle\FrameworkBundle\Console\Application;
1515
use Symfony\Component\Console\Tester\CommandTester;
16+
use Symfony\Component\DependencyInjection\Argument\ArgumentTrait;
1617

1718
/**
1819
* @group functional
@@ -40,14 +41,16 @@ public function testLintContainer(string $configFile, bool $resolveEnvVars, int
4041
$this->assertStringContainsString($expectedOutput, $tester->getDisplay());
4142
}
4243

43-
public static function containerLintProvider(): array
44+
public static function containerLintProvider(): iterable
4445
{
45-
return [
46-
['escaped_percent.yml', false, 0, 'The container was linted successfully'],
47-
['escaped_percent.yml', true, 0, 'The container was linted successfully'],
48-
['missing_env_var.yml', false, 0, 'The container was linted successfully'],
49-
['missing_env_var.yml', true, 1, 'Environment variable not found: "BAR"'],
50-
];
46+
yield ['escaped_percent.yml', false, 0, 'The container was linted successfully'];
47+
48+
if (trait_exists(ArgumentTrait::class)) {
49+
yield ['escaped_percent.yml', true, 0, 'The container was linted successfully'];
50+
}
51+
52+
yield ['missing_env_var.yml', false, 0, 'The container was linted successfully'];
53+
yield ['missing_env_var.yml', true, 1, 'Environment variable not found: "BAR"'];
5154
}
5255

5356
private function createCommandTester(): CommandTester

0 commit comments

Comments
 (0)