From 6586b7646585d34b878bda18155a37e5eec729cb Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 5 Sep 2009 13:05:31 +0000 Subject: =?UTF-8?q?-=20Patch=20by=20#1577=20by=20chx,=20boombatower,=20B?= =?UTF-8?q?=C3=A8r=20Kessels,=20kkaefer:=20made=20SSL=20support=20a=20bit?= =?UTF-8?q?=20easier=20by=20providing=20two=20cookies=20and=20...=20hook?= =?UTF-8?q?=5Fgoto=5Falter.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/simpletest/tests/common.test | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'modules/simpletest/tests/common.test') 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 @@ -600,6 +600,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. */ -- cgit v1.2.3