/**
* @dataProvider provideCompletionSuggestions
*/
public function testComplete(bool
$debug, array
$input, array
$expectedSuggestions) { $application =
$this->
createApplication($debug);
$application->
add(new ConfigDumpReferenceCommand());
$tester =
new CommandCompletionTester($application->
get('config:dump-reference'
));
$suggestions =
$tester->
complete($input);
$this->
assertSame($expectedSuggestions,
$suggestions);
} public static function provideCompletionSuggestions(): iterable
{ $name =
['foo', 'default_config_test', 'extension_without_config_test', 'framework', 'test', 'test_dump', 'DefaultConfigTestBundle', 'ExtensionWithoutConfigTestBundle', 'FrameworkBundle', 'TestBundle'
];
yield 'name, no debug' =>
[false,
[''
],
$name];
yield 'name, debug' =>
[true,
[''
],
$name];
$optionFormat =
['yaml', 'xml'
];
yield 'option --format, no debug' =>
[false,
['--format', ''
],
$optionFormat];