You are here

function TokenTaxonomyTestCase::addVocabulary in Token 7

Same name and namespace in other branches
  1. 6 token.test \TokenTaxonomyTestCase::addVocabulary()

File

./token.test, line 553
Test integration for the token module.

Class

TokenTaxonomyTestCase

Code

function addVocabulary(array $vocabulary = array()) {
  $vocabulary += array(
    'name' => drupal_strtolower($this
      ->randomName(5)),
    'nodes' => array(
      'article' => 'article',
    ),
  );
  $vocabulary = (object) $vocabulary;
  taxonomy_vocabulary_save($vocabulary);
  return $vocabulary;
}