You are here

function TokenTaxonomyTestCase::addTerm in Token 6

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

File

./token.test, line 437
Tests 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,
  );
  taxonomy_save_term($term);
  return (object) $term;
}