You are here

public function LinkitsearchPluginTaxonomyTermTestCase::testBasicResults in Linkit 7.3

Test that we get results back which is valid.

File

test/linkit_search_plugin_taxonomy_term.test, line 80
Tests for Linkit search plugin taxonomy term.

Class

LinkitsearchPluginTaxonomyTermTestCase
Test the the taxonomy term search plugin.

Code

public function testBasicResults() {

  // Create demo vocabulary.
  $vocabulary = $this
    ->createVocabulary();

  // Create demo terms.
  $term_1 = $this
    ->createTerm($vocabulary);
  $term_2 = $this
    ->createTerm($vocabulary);
  $term_3 = $this
    ->createTerm($vocabulary);

  // Call the autocomplete helper method.
  $this
    ->autocompleteCall();

  // Check that the term names appears in the response.
  $this
    ->assertRaw($term_1->name, 'Term was found in the result array.');
  $this
    ->assertRaw($term_2->name, 'Term was found in the result array.');
  $this
    ->assertRaw($term_3->name, 'Term was found in the result array.');
}