$this->
assertSame(1,
$ret);
$this->
assertStringContainsString('[ERROR] The "path" option is only available for the "yaml" format.',
$tester->
getDisplay());
} /**
* @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];