summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/module.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-09-29 18:08:28 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-09-29 18:08:28 +0000
commit0085972f1e62162b9c010237e5bd5b9b3bfccc4a (patch)
tree06e158fc0a7339996e16ad62025c7e810923a6c5 /modules/simpletest/tests/module.test
parent8f1ec56d35004b188b176a85c89aee6db29cdc55 (diff)
downloadbrdo-0085972f1e62162b9c010237e5bd5b9b3bfccc4a.tar.gz
brdo-0085972f1e62162b9c010237e5bd5b9b3bfccc4a.tar.bz2
#557542 follow-up by catch: Fixed module_implements() caching for authenticated users.
Diffstat (limited to 'modules/simpletest/tests/module.test')
-rw-r--r--modules/simpletest/tests/module.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/simpletest/tests/module.test b/modules/simpletest/tests/module.test
index a157c957a..059672e5c 100644
--- a/modules/simpletest/tests/module.test
+++ b/modules/simpletest/tests/module.test
@@ -81,6 +81,24 @@ class ModuleUnitTest extends DrupalWebTestCase {
ksort($expected_values);
$this->assertIdentical($expected_values, module_list(FALSE, FALSE, TRUE), t('@condition: module_list() returns correctly sorted results', array('@condition' => $condition)));
}
+
+ /**
+ * Test module_implements() caching.
+ */
+ function testModuleImplements() {
+ // Clear the cache.
+ cache_clear_all('module_implements', 'cache');
+ $this->assertFalse(cache_get('module_implements'), t('The module implements cache is empty.'));
+ $this->drupalGet('');
+ $this->assertTrue(cache_get('module_implements'), t('The module implements cache is populated after requesting a page.'));
+
+ // Test again with an authenticated user.
+ $this->user = $this->drupalCreateUser();
+ $this->drupalLogin($this->user);
+ cache_clear_all('module_implements', 'cache');
+ $this->drupalGet('');
+ $this->assertTrue(cache_get('module_implements'), t('The module implements cache is populated after requesting a page.'));
+ }
}
/**