|
24 | 24 | */
|
25 | 25 | class ConfigDebugCommandTest extends AbstractWebTestCase
|
26 | 26 | {
|
| 27 | + /** |
| 28 | + * @testWith [true] |
| 29 | + * [false] |
| 30 | + */ |
| 31 | + public function testShowList(bool $debug) |
| 32 | + { |
| 33 | + $tester = $this->createCommandTester($debug); |
| 34 | + $ret = $tester->execute([]); |
| 35 | + |
| 36 | + $this->assertSame(0, $ret, 'Returns 0 in case of success'); |
| 37 | + $this->assertStringContainsString('Available registered bundles with their extension alias if available', $tester->getDisplay()); |
| 38 | + $this->assertStringContainsString(' DefaultConfigTestBundle default_config_test', $tester->getDisplay()); |
| 39 | + $this->assertStringContainsString(' ExtensionWithoutConfigTestBundle extension_without_config_test', $tester->getDisplay()); |
| 40 | + $this->assertStringContainsString(' FrameworkBundle framework', $tester->getDisplay()); |
| 41 | + $this->assertStringContainsString(' TestBundle test', $tester->getDisplay()); |
| 42 | + $this->assertStringContainsString('Available registered non-bundle extension aliases', $tester->getDisplay()); |
| 43 | + $this->assertStringContainsString(' foo', $tester->getDisplay()); |
| 44 | + $this->assertStringContainsString(' test_dump', $tester->getDisplay()); |
| 45 | + } |
| 46 | + |
27 | 47 | /**
|
28 | 48 | * @testWith [true]
|
29 | 49 | * [false]
|
@@ -219,14 +239,10 @@ public function testComplete(bool $debug, array $input, array $expectedSuggestio
|
219 | 239 |
|
220 | 240 | public static function provideCompletionSuggestions(): \Generator
|
221 | 241 | {
|
222 |
| - $name = ['default_config_test', 'extension_without_config_test', 'framework', 'test']; |
| 242 | + $name = ['default_config_test', 'extension_without_config_test', 'framework', 'test', 'foo', 'test_dump']; |
223 | 243 | yield 'name, no debug' => [false, [''], $name];
|
224 | 244 | yield 'name, debug' => [true, [''], $name];
|
225 | 245 |
|
226 |
| - $nameCamelCased = ['DefaultConfigTestBundle', 'ExtensionWithoutConfigTestBundle', 'FrameworkBundle', 'TestBundle']; |
227 |
| - yield 'name (started CamelCase), no debug' => [false, ['Fra'], $nameCamelCased]; |
228 |
| - yield 'name (started CamelCase), debug' => [true, ['Fra'], $nameCamelCased]; |
229 |
| - |
230 | 246 | $nameWithPath = ['secret', 'router.resource', 'router.utf8', 'router.enabled', 'validation.enabled', 'default_locale'];
|
231 | 247 | yield 'name with existing path, no debug' => [false, ['framework', ''], $nameWithPath];
|
232 | 248 | yield 'name with existing path, debug' => [true, ['framework', ''], $nameWithPath];
|
|
0 commit comments