function TokenTaxonomyTestCase::addTerm in Token 6
Same name and namespace in other branches
- 7 token.test \TokenTaxonomyTestCase::addTerm()
1 call to TokenTaxonomyTestCase::addTerm()
File
- ./
token.test, line 437 - Tests for the token module.
Class
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;
}