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