public function testComplete(array
$input, array
$expectedSuggestions) { $tester =
$this->
createCommandCompletionTester(['messages' =>
['foo' => 'foo'
]]);
$suggestions =
$tester->
complete($input);
$this->
assertSame($expectedSuggestions,
$suggestions);
} public static function provideCompletionSuggestions() { $bundle =
new ExtensionPresentBundle();
yield 'locale' =>
[[''
],
['en', 'fr'
]];
yield 'bundle' =>
[['en', ''
],
[$bundle->
getName(),
$bundle->
getContainerExtension()->
getAlias()]];
yield 'domain with locale' =>
[['en', '--domain=m'
],
['messages'
]];
yield 'domain without locale' =>
[['--domain=m'
],
[]];
yield 'format' =>
[['en', '--format='
],
['php', 'xlf', 'po', 'mo', 'yml', 'yaml', 'ts', 'csv', 'ini', 'json', 'res', 'xlf12', 'xlf20'
]];
yield 'sort' =>
[['en', '--sort='
],
['asc', 'desc'
]];
} protected function setUp(): void
{