1 taxonomy_views_handler_relationship_node_term_data.test | TaxonomyViewsHandlerRelationshipNodeTermDataTest::createTerm($vocabulary) |
Returns a new term with random properties in vocabulary $vid.
File
- core/
modules/ taxonomy/ tests/ taxonomy_views_handler_relationship_node_term_data.test, line 32 - Definition of ViewsHandlerRelationshipNodeTermDataTest.
Class
- TaxonomyViewsHandlerRelationshipNodeTermDataTest
- Tests the relationship_node_term_data handler.
Code
function createTerm($vocabulary) {
$term = entity_create('taxonomy_term', array(
'name' => $this->randomName(),
'description' => $this->randomName(),
'format' => filter_default_format(),
'vocabulary' => $vocabulary->machine_name,
));
taxonomy_term_save($term);
return $term;
}