summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/common.test
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-09-05 13:05:31 +0000
committerDries Buytaert <dries@buytaert.net>2009-09-05 13:05:31 +0000
commit6586b7646585d34b878bda18155a37e5eec729cb (patch)
tree344c0b1fc90a22b8e896e40c27fa0edc421e93f5 /modules/simpletest/tests/common.test
parent2f957104450835e8007a40af31d440f616517e7c (diff)
downloadbrdo-6586b7646585d34b878bda18155a37e5eec729cb.tar.gz
brdo-6586b7646585d34b878bda18155a37e5eec729cb.tar.bz2
- Patch by #1577 by chx, boombatower, Bèr Kessels, kkaefer: made SSL support a bit easier by providing two cookies and ... hook_goto_alter.
Diffstat (limited to 'modules/simpletest/tests/common.test')
-rw-r--r--modules/simpletest/tests/common.test37
1 files changed, 37 insertions, 0 deletions
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index ad565b1ab..dc6b0c7c8 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -601,6 +601,43 @@ class DrupalSetContentTestCase extends DrupalWebTestCase {
}
/**
+ * Testing drupal_goto and hook_drupal_goto_alter().
+ */
+class DrupalGotoTest extends DrupalWebTestCase {
+ public static function getInfo() {
+ return array(
+ 'name' => 'Drupal goto',
+ 'description' => 'Performs tests on the drupal_goto function and hook_drupal_goto_alter',
+ 'group' => 'System'
+ );
+ }
+
+ function setUp() {
+ parent::setUp('common_test');
+ }
+
+ /**
+ * Test setting and retrieving content for theme regions.
+ */
+ function testDrupalGoto() {
+ $this->drupalGet('common-test/drupal_goto/redirect');
+
+ $this->assertNoText(t("Drupal goto failed to stop program"), t("Drupal goto stopped program."));
+ $this->assertText('drupal_goto', t("Drupal goto redirect failed."));
+ }
+
+ /**
+ * Test setting and retrieving content for theme regions.
+ */
+ function testDrupalGotoAlter() {
+ $this->drupalGet('common-test/drupal_goto/redirect_fail');
+
+ $this->assertNoText(t("Drupal goto failed to stop program"), t("Drupal goto stopped program."));
+ $this->assertNoText('drupal_goto_fail', t("Drupal goto redirect failed."));
+ }
+}
+
+/**
* Tests for the JavaScript system.
*/
class JavaScriptTestCase extends DrupalWebTestCase {