You are here

private function UIFTestCaseFieldFields::createVocabulary in User Import Framework 7

Returns a new vocabulary of some name.

File

./uif.test, line 350
UIF test code.

Class

UIFTestCaseFieldFields
Test import with Field module fields.

Code

private function createVocabulary($name) {

  // Create a vocabulary.
  $vocabulary = new stdClass();
  $vocabulary->name = $name;
  $vocabulary->description = $name;
  $vocabulary->machine_name = drupal_strtolower($name);
  $vocabulary->help = '';
  $vocabulary->nodes = array(
    'article' => 'article',
  );
  $vocabulary->weight = mt_rand(0, 10);
  taxonomy_vocabulary_save($vocabulary);
  return $vocabulary;
}