public function LinkitsearchPluginTaxonomyTermTestCase::testDescription in Linkit 7.3
Test result description.
We just test one token.
File
- test/
linkit_search_plugin_taxonomy_term.test, line 160 - Tests for Linkit search plugin taxonomy term.
Class
- LinkitsearchPluginTaxonomyTermTestCase
- Test the the taxonomy term search plugin.
Code
public function testDescription() {
// Create demo vocabulary.
$vocabulary_1 = $this
->createVocabulary();
$vocabulary_2 = $this
->createVocabulary();
// Create demo terms.
$term_1 = $this
->createTerm($vocabulary_1);
$term_2 = $this
->createTerm($vocabulary_2);
// Update the profile with a taxonomy_term result description.
$this->_profile->data['entity:taxonomy_term']['result_description'] = 'Term [term:vocabulary]';
$this
->updateProfile();
// Call the autocomplete helper method.
$this
->autocompleteCall();
// Check that the result description appers in the result.
$this
->assertRaw('Term ' . $vocabulary_1->name, 'The result description was found in the result array.');
$this
->assertRaw('Term ' . $vocabulary_2->name, 'The result description was found in the result array.');
}