|
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]
|
@@ -201,14 +221,10 @@ public function testComplete(bool $debug, array $input, array $expectedSuggestio
|
201 | 221 |
|
202 | 222 | public static function provideCompletionSuggestions(): \Generator
|
203 | 223 | {
|
204 |
| - $name = ['default_config_test', 'extension_without_config_test', 'framework', 'test']; |
| 224 | + $name = ['default_config_test', 'extension_without_config_test', 'framework', 'test', 'foo', 'test_dump']; |
205 | 225 | yield 'name, no debug' => [false, [''], $name];
|
206 | 226 | yield 'name, debug' => [true, [''], $name];
|
207 | 227 |
|
208 |
| - $nameCamelCased = ['DefaultConfigTestBundle', 'ExtensionWithoutConfigTestBundle', 'FrameworkBundle', 'TestBundle']; |
209 |
| - yield 'name (started CamelCase), no debug' => [false, ['Fra'], $nameCamelCased]; |
210 |
| - yield 'name (started CamelCase), debug' => [true, ['Fra'], $nameCamelCased]; |
211 |
| - |
212 | 228 | $nameWithPath = ['secret', 'router.resource', 'router.utf8', 'router.enabled', 'validation.enabled', 'default_locale'];
|
213 | 229 | yield 'name with existing path, no debug' => [false, ['framework', ''], $nameWithPath];
|
214 | 230 | yield 'name with existing path, debug' => [true, ['framework', ''], $nameWithPath];
|
|
0 commit comments