public function CategoryAutocompleteTest::providerTestAutocompleteSuggestions in Drupal 9
Same name and namespace in other branches
- 8 core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php \Drupal\Tests\block\Unit\CategoryAutocompleteTest::providerTestAutocompleteSuggestions()
- 10 core/modules/block/tests/src/Unit/CategoryAutocompleteTest.php \Drupal\Tests\block\Unit\CategoryAutocompleteTest::providerTestAutocompleteSuggestions()
Data provider for testAutocompleteSuggestions().
Return value
array
File
- core/
modules/ block/ tests/ src/ Unit/ CategoryAutocompleteTest.php, line 57
Class
- CategoryAutocompleteTest
- @coversDefaultClass \Drupal\block\Controller\CategoryAutocompleteController @group block
Namespace
Drupal\Tests\block\UnitCode
public function providerTestAutocompleteSuggestions() {
$test_parameters = [];
$test_parameters[] = [
'string' => 'Com',
'suggestions' => [
'Comment',
],
];
$test_parameters[] = [
'string' => 'No',
'suggestions' => [
'Node',
'None & Such',
],
];
$test_parameters[] = [
'string' => 'us',
'suggestions' => [
'User',
],
];
$test_parameters[] = [
'string' => 'Banana',
'suggestions' => [],
];
return $test_parameters;
}