protected function DeployWebTestCase::createTerm in Deploy - Content Staging 7.2
Same name and namespace in other branches
- 7.3 deploy.test \DeployWebTestCase::createTerm()
Code taken from TaxonomyWebTestCase::createTerm() since we can't extend that test case. Some simplifications are made though.
@todo This will probably not work when the Testing profile is used. Then we need to create the vocabulary manually.
See also
TaxonomyWebTestCase::createTerm()
1 call to DeployWebTestCase::createTerm()
- DeployWebTestCase::runScenario in ./
deploy.test - This method runs a deployment scenario where we have one production site (the endpoint) and a staging site (the origin).
File
- ./
deploy.test, line 240 - Deployment tests.
Class
- DeployWebTestCase
- Helper class.
Code
protected function createTerm() {
$term = new stdClass();
$term->name = $this
->randomName();
$term->description = $this
->randomName();
// Use the first available text format.
$term->format = db_query_range('SELECT format FROM {filter_format}', 0, 1)
->fetchField();
// For our test cases it's enough to rely on the standard 'tags' vocabulary.
$term->vid = 1;
taxonomy_term_save($term);
return $term;
}