Returns a new vocabulary with random properties.
function createVocabulary() {
// Create a vocabulary.
$vocabulary = entity_create('taxonomy_vocabulary', array(
'name' => $this
->randomName(),
'description' => $this
->randomName(),
'machine_name' => drupal_strtolower($this
->randomName()),
'langcode' => LANGUAGE_NOT_SPECIFIED,
'help' => '',
'nodes' => array(
'article' => 'article',
),
'weight' => mt_rand(0, 10),
));
taxonomy_vocabulary_save($vocabulary);
return $vocabulary;
}