1 taxonomy.test TaxonomyVocabularyFunctionalTest::testTaxonomyAdminNoVocabularies()

Test the vocabulary overview with no vocabularies.

File

core/modules/taxonomy/tests/taxonomy.test, line 232
Tests for taxonomy.module.

Class

TaxonomyVocabularyFunctionalTest
Tests the taxonomy vocabulary interface.

Code

function testTaxonomyAdminNoVocabularies() {
  // Delete all vocabularies.
  $vocabularies = taxonomy_vocabulary_load_multiple(FALSE);
  foreach ($vocabularies as $key => $vocabulary) {
    taxonomy_vocabulary_delete($key);
  }
  // Confirm that no vocabularies are found in the database.
  $this->assertFalse(taxonomy_vocabulary_load_multiple(FALSE), 'No vocabularies found in the database.');
  $this->backdropGet('admin/structure/taxonomy');
  // Check the default message for no vocabularies.
  $this->assertText(t('No vocabularies available.'), 'No vocabularies were found.');
}