function LinkitsearchPluginTaxonomyTermTestCase::createVocabulary in Linkit 7.3
Create and returns a new vocabulary.
4 calls to LinkitsearchPluginTaxonomyTermTestCase::createVocabulary()
- 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 50 - Tests for Linkit search plugin taxonomy term.
Class
- LinkitsearchPluginTaxonomyTermTestCase
- Test the the taxonomy term search plugin.
Code
function createVocabulary() {
// Create a vocabulary.
$vocabulary = new stdClass();
$vocabulary->name = $this
->randomName();
$vocabulary->description = $this
->randomName();
$vocabulary->machine_name = drupal_strtolower($this
->randomName());
$vocabulary->help = '';
$vocabulary->nodes = array(
'article' => 'article',
);
$vocabulary->weight = mt_rand(0, 10);
taxonomy_vocabulary_save($vocabulary);
return $vocabulary;
}