You are here

function TokenTaxonomyTestCase::addTerm in Token 7

Same name and namespace in other branches
  1. 6 token.test \TokenTaxonomyTestCase::addTerm()
1 call to TokenTaxonomyTestCase::addTerm()
TokenTaxonomyTestCase::testTaxonomyTokens in ./token.test
Test the additional taxonomy term tokens.

File

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

Class

TokenTaxonomyTestCase

Code

function addTerm(stdClass $vocabulary, array $term = array()) {
  $term += array(
    'name' => drupal_strtolower($this
      ->randomName(5)),
    'vid' => $vocabulary->vid,
  );
  $term = (object) $term;
  taxonomy_term_save($term);
  return $term;
}