1 token.test TokenTaxonomyTestCase::addVocabulary(array $vocabulary = array())

File

core/modules/simpletest/tests/token.test, line 702
Test integration for the token module.

Class

TokenTaxonomyTestCase

Code

function addVocabulary(array $vocabulary = array()) {
  $vocabulary += array(
    'name' => backdrop_strtolower($this->randomName(5)),
    'nodes' => array('post' => 'post'),
  );
  $vocabulary = new TaxonomyVocabulary($vocabulary);
  taxonomy_vocabulary_save($vocabulary);
  return $vocabulary;
}