summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2008-09-24 18:42:00 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2008-09-24 18:42:00 +0000
commit991ff539c32bb61bffb4b41d132bb3b8b35c8ece (patch)
treea34cf527ea6472dcc0922ed52e72fc8750f2dd3e /modules/taxonomy/taxonomy.test
parentb43010c5bdccb7b898aa1c3ca8f92f98d9e03c57 (diff)
downloadbrdo-991ff539c32bb61bffb4b41d132bb3b8b35c8ece.tar.gz
brdo-991ff539c32bb61bffb4b41d132bb3b8b35c8ece.tar.bz2
#296910 by catch and webchick: Add reset parameter to taxonomy_vocabulary_load().
Diffstat (limited to 'modules/taxonomy/taxonomy.test')
-rw-r--r--modules/taxonomy/taxonomy.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index 1f96bdaaf..17505f3da 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -49,6 +49,26 @@ class TaxonomyVocabularyLoadTestCase extends DrupalWebTestCase {
$this->assertTrue(is_object($vocabulary), t('Vocabulary is an object'));
$this->assertTrue($vocabulary->vid == $vid, t('Valid vocabulary vid is the same as our previously invalid one.'));
}
+
+ /**
+ * Ensure that the vocabulary static reset works correctly.
+ */
+ function testTaxonomyVocabularyLoadStaticReset() {
+ // Load the first available vocabulary.
+ $original_vocabulary = taxonomy_vocabulary_load(1);
+
+ // Change the name and description.
+ $edit = (array) $original_vocabulary;
+ $edit['name'] = $this->randomName();
+ $edit['description'] = $this->randomName();
+ $this->assertNotEqual($edit['name'], $original_vocabulary->name);
+ taxonomy_save_vocabulary($edit);
+
+ // Load the vocabulary with $reset TRUE.
+ $new_vocabulary = taxonomy_vocabulary_load($original_vocabulary->vid, TRUE);
+ $this->assertEqual($new_vocabulary->name, $edit['name']);
+ $this->assertEqual($new_vocabulary->name, $edit['name']);
+ }
}
class TaxonomyVocabularyFunctionsTestCase extends DrupalWebTestCase {