You are here

function ABTWebTestCase::createVocabulary in Access By Term 7

1 call to ABTWebTestCase::createVocabulary()
ABTWebTestCase::setUpTaxonomy in ./abt.test

File

./abt.test, line 39

Class

ABTWebTestCase

Code

function createVocabulary($numberOfVocs = 1) {
  for ($i = 0; $i < $numberOfVocs; $i++) {
    $vocs[$i] = (object) array(
      'name' => $this
        ->randomName(),
      'machine_name' => drupal_strtolower($this
        ->randomName()),
    );
    taxonomy_vocabulary_save($vocs[$i]);
  }
  return $vocs;
}