function TaxonomyWebTestCase::createVocabulary

Returns a new vocabulary with random properties.

44 calls to TaxonomyWebTestCase::createVocabulary()
RdfMappingDefinitionTestCase::testTaxonomyTermRdfaAttributes in drupal-7.x/modules/rdf/rdf.test
Creates a random term and ensures the right RDFa markup is used.
RdfMappingDefinitionTestCase::testTaxonomyTermRdfaAttributes in drupal-7.x/modules/rdf/rdf.test
Creates a random term and ensures the right RDFa markup is used.
TaxonomyEFQTestCase::setUp in drupal-7.x/modules/taxonomy/taxonomy.test
Sets up a Drupal site for running functional and integration tests.
TaxonomyEFQTestCase::setUp in drupal-7.x/modules/taxonomy/taxonomy.test
Sets up a Drupal site for running functional and integration tests.
TaxonomyEFQTestCase::testTaxonomyEFQ in drupal-7.x/modules/taxonomy/taxonomy.test
Tests that a basic taxonomy EntityFieldQuery works.

... See full list

Archivo

drupal-7.x/modules/taxonomy/taxonomy.test, line 16
Tests for taxonomy.module.

Class

TaxonomyWebTestCase
Provides common helper methods for Taxonomy module tests.

Código

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