You are here

function PathautoTestHelper::addVocabulary in Pathauto 6

Same name and namespace in other branches
  1. 6.2 pathauto.test \PathautoTestHelper::addVocabulary()
  2. 7 pathauto.test \PathautoTestHelper::addVocabulary()
2 calls to PathautoTestHelper::addVocabulary()
PathautoTaxonomyTokenTestCase::setUp in ./pathauto.test
Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
PathautoUnitTestCase::testEntityBundleRenamingDeleting in ./pathauto.test

File

./pathauto.test, line 151
Functionality tests for Pathauto.

Class

PathautoTestHelper
Helper test class with some added functions for testing.

Code

function addVocabulary(array $vocabulary = array()) {
  $vocabulary += array(
    'name' => drupal_strtolower($this
      ->randomName(5)),
    'nodes' => array(
      'story' => 'story',
    ),
  );
  taxonomy_save_vocabulary($vocabulary);
  return (object) $vocabulary;
}