protected function ViewsSqlTest::drupalCreateTerm in Views (for Drupal 7) 7.3
Create a term.
Parameters
int $vid: The vocabulary ID that the term is to be added to.
Return value
object A full term object with a random name.
1 call to ViewsSqlTest::drupalCreateTerm()
- ViewsHandlerFilterTest::testFilterInOperatorUi in tests/views_handler_filter.test 
- Tests "is all of" of filter operation.
File
- tests/views_query.test, line 215 
- Abstract class for views testing.
Class
Code
protected function drupalCreateTerm($vid) {
  $term = new stdClass();
  $term->name = $this
    ->randomName();
  $term->description = $this
    ->randomName();
  $term->vid = $vid;
  taxonomy_term_save($term);
  return $term;
}