| 7 taxonomy.test | TaxonomyVocabularyFunctionalTest::testTaxonomyAdminNoVocabularies() |
| 8 taxonomy.test | TaxonomyVocabularyFunctionalTest::testTaxonomyAdminNoVocabularies() |
Test the vocabulary overview with no vocabularies.
File
- modules/
taxonomy/ taxonomy.test, line 133 - Tests for taxonomy.module.
Code
function testTaxonomyAdminNoVocabularies() {
// Delete all vocabularies.
$vocabularies = taxonomy_get_vocabularies();
foreach ($vocabularies as $key => $vocabulary) {
taxonomy_vocabulary_delete($key);
}
// Confirm that no vocabularies are found in the database.
$this->assertFalse(taxonomy_get_vocabularies(), t('No vocabularies found in the database'));
$this->drupalGet('admin/structure/taxonomy');
// Check the default message for no vocabularies.
$this->assertText(t('No vocabularies available.'), t('No vocabularies were found.'));
}
Login or register to post comments