function LinkitsearchPluginTaxonomyTermTestCase::createTerm in Linkit 7.3
Create and returns a new term in vocabulary $vid.
4 calls to LinkitsearchPluginTaxonomyTermTestCase::createTerm()
- LinkitsearchPluginTaxonomyTermTestCase::testBasicResults in test/
linkit_search_plugin_taxonomy_term.test - Test that we get results back which is valid.
- LinkitsearchPluginTaxonomyTermTestCase::testBundleFilter in test/
linkit_search_plugin_taxonomy_term.test - Test bundle filter.
- LinkitsearchPluginTaxonomyTermTestCase::testDescription in test/
linkit_search_plugin_taxonomy_term.test - Test result description.
- LinkitsearchPluginTaxonomyTermTestCase::testGroupbyBundle in test/
linkit_search_plugin_taxonomy_term.test - Test group by bundle.
File
- test/
linkit_search_plugin_taxonomy_term.test, line 66 - Tests for Linkit search plugin taxonomy term.
Class
- LinkitsearchPluginTaxonomyTermTestCase
- Test the the taxonomy term search plugin.
Code
function createTerm($vocabulary) {
$term = new stdClass();
$term->name = $this->search_string . $this
->randomName();
$term->description = $this
->randomName();
// Use the first available text format.
$term->format = 'plain_text';
$term->vid = $vocabulary->vid;
taxonomy_term_save($term);
return $term;
}