Returns a new vocabulary with random properties.
function createVocabulary() {
// Create a vocabulary.
$vocabulary = entity_create('taxonomy_vocabulary', array(
'name' => $this
->randomName(),
'description' => $this
->randomName(),
'vid' => drupal_strtolower($this
->randomName()),
'langcode' => Language::LANGCODE_NOT_SPECIFIED,
'weight' => mt_rand(0, 10),
));
$vocabulary
->save();
return $vocabulary;
}