You are here

function TokenEntityTestCase::addTerm in Token 7

1 call to TokenEntityTestCase::addTerm()
TokenEntityTestCase::testEntityMapping in ./token.test

File

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

Class

TokenEntityTestCase

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;
}