summaryrefslogtreecommitdiff
path: root/modules/system/system.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-02-17 22:44:52 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-02-17 22:44:52 +0000
commit8d01aeb4287be61195a43305e34f379086914f5d (patch)
tree88ef91e8532ed82085dfa5ce8a854116f891173b /modules/system/system.test
parent8847f4c9a2edcd2f555d6a47b5037c88c671cc3c (diff)
downloadbrdo-8d01aeb4287be61195a43305e34f379086914f5d.tar.gz
brdo-8d01aeb4287be61195a43305e34f379086914f5d.tar.bz2
#710142 by Berdir, moshe weitzman, chx: Handle exceptions in shutdown functions (with tests). Hopefully the last of these weird 'Stack frame in Unknown line 0' errors.
Diffstat (limited to 'modules/system/system.test')
-rw-r--r--modules/system/system.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/system/system.test b/modules/system/system.test
index e33ad11a8..79e141225 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -1598,3 +1598,31 @@ class FloodFunctionalTest extends DrupalWebTestCase {
$this->assertFalse(flood_is_allowed($name, $threshold));
}
}
+
+/**
+ * Functional tests shutdown functions.
+ */
+class ShutdownFunctionsTest extends DrupalWebTestCase {
+ public static function getInfo() {
+ return array(
+ 'name' => 'Shutdown functions',
+ 'description' => 'Functional tests for shutdown functions',
+ 'group' => 'System',
+ );
+ }
+
+ function setUp() {
+ parent::setUp('system_test');
+ }
+
+ /**
+ * Test flood control mechanism clean-up.
+ */
+ function testShutdownFunctions() {
+ $arg1 = $this->randomName();
+ $arg2 = $this->randomName();
+ $this->drupalGet('system-test/shutdown-functions/' . $arg1 . '/' . $arg2);
+ $this->assertText(t('First shutdown function, arg1 : @arg1, arg2: @arg2', array('@arg1' => $arg1, '@arg2' => $arg2)));
+ $this->assertText(t('Second shutdown function, arg1 : @arg1, arg2: @arg2', array('@arg1' => $arg1, '@arg2' => $arg2)));
+ }
+} \ No newline at end of file