From 8d01aeb4287be61195a43305e34f379086914f5d Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Wed, 17 Feb 2010 22:44:52 +0000 Subject: #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. --- modules/system/system.test | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'modules/system/system.test') 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 -- cgit v1.2.3