|
13 | 13 |
|
14 | 14 | use Symfony\Bundle\FrameworkBundle\Console\Application; |
15 | 15 | use Symfony\Component\Console\Tester\CommandTester; |
| 16 | +use Symfony\Component\DependencyInjection\Argument\ArgumentTrait; |
16 | 17 |
|
17 | 18 | /** |
18 | 19 | * @group functional |
@@ -40,14 +41,16 @@ public function testLintContainer(string $configFile, bool $resolveEnvVars, int |
40 | 41 | $this->assertStringContainsString($expectedOutput, $tester->getDisplay()); |
41 | 42 | } |
42 | 43 |
|
43 | | - public static function containerLintProvider(): array |
| 44 | + public static function containerLintProvider(): iterable |
44 | 45 | { |
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"']; |
51 | 54 | } |
52 | 55 |
|
53 | 56 | private function createCommandTester(): CommandTester |
|
0 commit comments