public function testAutocompleteSuggestions($string,
$suggestions) { $suggestions =
array_map(function D
$suggestion) { return ['value' =>
$suggestion, 'label' => Html::
escape($suggestion)];
},
$suggestions);
$result =
$this->autocompleteController->
autocomplete(new Request(['q' =>
$string]));
$this->
assertSame($suggestions,
json_decode($result->
getContent(), TRUE
));
} /**
* Data provider for testAutocompleteSuggestions().
*
* @return array
*/
public function providerTestAutocompleteSuggestions() { $test_parameters =
[];
$test_parameters[] =
[