function ViewsUIWizardJumpMenuTestCase::createTaxonomyTermAndGetPath

Helper function to create a taxonomy term and return its expected path.

File

tests/views_ui.test, line 808

Class

ViewsUIWizardJumpMenuTestCase
Tests the ability of the wizard to create views with a jump menu style.

Code

public function createTaxonomyTermAndGetPath() {
    $vocabulary = new stdClass();
    $vocabulary->name = $this->randomName();
    $vocabulary->machine_name = drupal_strtolower($this->randomName());
    taxonomy_vocabulary_save($vocabulary);
    $term = new stdClass();
    $term->name = $this->randomName();
    $term->vid = $vocabulary->vid;
    taxonomy_term_save($term);
    return entity_uri('taxonomy_term', $term);
}