You are here

public function CategoryAutocompleteTest::providerTestAutocompleteSuggestions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 62
Contains \Drupal\Tests\block\Unit\CategoryAutocompleteTest.

Class

CategoryAutocompleteTest
@coversDefaultClass \Drupal\block\Controller\CategoryAutocompleteController @group block

Namespace

Drupal\Tests\block\Unit

Code

public function providerTestAutocompleteSuggestions() {
  $test_parameters = array();
  $test_parameters[] = array(
    'string' => 'Com',
    'suggestions' => array(
      'Comment',
    ),
  );
  $test_parameters[] = array(
    'string' => 'No',
    'suggestions' => array(
      'Node',
      'None & Such',
    ),
  );
  $test_parameters[] = array(
    'string' => 'us',
    'suggestions' => array(
      'User',
    ),
  );
  $test_parameters[] = array(
    'string' => 'Banana',
    'suggestions' => array(),
  );
  return $test_parameters;
}