function ViewsSqlTest::drupalCreateTerm

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 216

Class

ViewsSqlTest

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;
}