protected function AuthcacheFlagTest::createTerm in Authenticated User Page Caching (Authcache) 7.2
Returns a new term with random properties in vocabulary $vid.
See also
TaxonomyWebTestCase::createTerm()
1 call to AuthcacheFlagTest::createTerm()
- AuthcacheFlagTest::setUp in modules/
authcache_flag/ authcache_flag.test - Sets up a Drupal site for running functional and integration tests.
File
- modules/
authcache_flag/ authcache_flag.test, line 228 - Test cases for the Authcache Flag module.
Class
- AuthcacheFlagTest
- Tests for markup substitution.
Code
protected function createTerm($vocabulary) {
$term = new stdClass();
$term->name = $this
->randomName();
$term->description = $this
->randomName();
// Use the first available text format.
$term->format = db_query_range('SELECT format FROM {filter_format}', 0, 1)
->fetchField();
$term->vid = $vocabulary->vid;
taxonomy_term_save($term);
return $term;
}