1 taxonomy.test protected TaxonomyVocabularyUnitTest::testTaxonomyVocabularyLoadProp()

Test that adding properties via hook_taxonomy_vocabulary_load() works.

File

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

Class

TaxonomyVocabularyUnitTest
Tests for taxonomy vocabulary functions.

Code

protected function testTaxonomyVocabularyLoadProp() {
  module_enable(array('taxonomy_vocab_load_test'));
  // Create two more vocabularies to load.
  $this->createVocabulary();
  $this->createVocabulary();

  $vocabs = taxonomy_vocabulary_load_multiple(FALSE);
  foreach ($vocabs as $name => $vocab) {
    $this->assertTrue(!empty($vocab->dynamicProp), format_string('Dynamic property via load hook for vocabulary %vocab is set.', array(
      '%vocab' => $name,
    )));
  }
}