|
23 | 23 | */
|
24 | 24 | class ConfigDebugCommandTest extends AbstractWebTestCase
|
25 | 25 | {
|
| 26 | + /** |
| 27 | + * @testWith [true] |
| 28 | + * [false] |
| 29 | + */ |
| 30 | + public function testShowList(bool $debug) |
| 31 | + { |
| 32 | + $tester = $this->createCommandTester($debug); |
| 33 | + $ret = $tester->execute([]); |
| 34 | + |
| 35 | + $this->assertSame(0, $ret, 'Returns 0 in case of success'); |
| 36 | + $this->assertStringContainsString('Available registered bundles with their extension alias if available', $tester->getDisplay()); |
| 37 | + $this->assertStringContainsString(' DefaultConfigTestBundle default_config_test', $tester->getDisplay()); |
| 38 | + $this->assertStringContainsString(' ExtensionWithoutConfigTestBundle extension_without_config_test', $tester->getDisplay()); |
| 39 | + $this->assertStringContainsString(' FrameworkBundle framework', $tester->getDisplay()); |
| 40 | + $this->assertStringContainsString(' TestBundle test', $tester->getDisplay()); |
| 41 | + $this->assertStringContainsString('Available registered non-bundle extension aliases', $tester->getDisplay()); |
| 42 | + $this->assertStringContainsString(' foo', $tester->getDisplay()); |
| 43 | + $this->assertStringContainsString(' test_dump', $tester->getDisplay()); |
| 44 | + } |
| 45 | + |
26 | 46 | /**
|
27 | 47 | * @testWith [true]
|
28 | 48 | * [false]
|
@@ -185,14 +205,10 @@ public function testComplete(bool $debug, array $input, array $expectedSuggestio
|
185 | 205 |
|
186 | 206 | public static function provideCompletionSuggestions(): \Generator
|
187 | 207 | {
|
188 |
| - $name = ['default_config_test', 'extension_without_config_test', 'framework', 'test']; |
| 208 | + $name = ['default_config_test', 'extension_without_config_test', 'framework', 'test', 'foo', 'test_dump']; |
189 | 209 | yield 'name, no debug' => [false, [''], $name];
|
190 | 210 | yield 'name, debug' => [true, [''], $name];
|
191 | 211 |
|
192 |
| - $nameCamelCased = ['DefaultConfigTestBundle', 'ExtensionWithoutConfigTestBundle', 'FrameworkBundle', 'TestBundle']; |
193 |
| - yield 'name (started CamelCase), no debug' => [false, ['Fra'], $nameCamelCased]; |
194 |
| - yield 'name (started CamelCase), debug' => [true, ['Fra'], $nameCamelCased]; |
195 |
| - |
196 | 212 | $nameWithPath = ['secret', 'router.resource', 'router.utf8', 'router.enabled', 'validation.enabled', 'default_locale'];
|
197 | 213 | yield 'name with existing path, no debug' => [false, ['framework', ''], $nameWithPath];
|
198 | 214 | yield 'name with existing path, debug' => [true, ['framework', ''], $nameWithPath];
|
|
0 commit comments