You are here

function TokenTaxonomyTestCase::addVocabulary in Token 6

Same name and namespace in other branches
  1. 7 token.test \TokenTaxonomyTestCase::addVocabulary()
1 call to TokenTaxonomyTestCase::addVocabulary()
TokenTaxonomyTestCase::testTaxonomyTokens in ./token.test

File

./token.test, line 428
Tests for the token module.

Class

TokenTaxonomyTestCase

Code

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