diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-05-01 06:08:25 -0400 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-05-01 06:08:25 -0400 |
commit | 3f154706a3da1084b304cfc0b36fa375471e2f19 (patch) | |
tree | 4cc1c72caa5d3ed6d9de629b9e4589b68ba1fce8 /modules | |
parent | 9888e8884e7142509d28575c8c97854f6357d6bd (diff) | |
download | brdo-3f154706a3da1084b304cfc0b36fa375471e2f19.tar.gz brdo-3f154706a3da1084b304cfc0b36fa375471e2f19.tar.bz2 |
- Patch #711650 by marcvangend, cha0s: when index.php appears in the URL (or is automatically added by the server) users get a 'page not found' message.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/system/system.test | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/system/system.test b/modules/system/system.test index cba19f3ff..19131dff4 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -2178,3 +2178,37 @@ class SystemAuthorizeCase extends DrupalWebTestCase { $this->assertText('System Test Username'); } } + +/** + * Test the handling of requests containing 'index.php'. + */ +class SystemIndexPhpTest extends DrupalWebTestCase { + public static function getInfo() { + return array( + 'name' => 'Index.php handling', + 'description' => "Test the handling of requests containing 'index.php'.", + 'group' => 'System', + ); + } + + function setUp() { + parent::setUp(); + } + + /** + * Test index.php handling. + */ + function testIndexPhpHandling() { + $index_php = $GLOBALS['base_url'] . '/index.php'; + + $this->drupalGet($index_php, array('external' => TRUE)); + $this->assertResponse(200, t('Make sure index.php returns a valid page.')); + + $this->drupalGet($index_php, array('external' => TRUE, 'query' => array('q' => 'user'))); + $this->assertResponse(200, t('Make sure index.php?q=user returns a valid page.')); + + $this->drupalGet($index_php .'/user', array('external' => TRUE)); + $this->assertResponse(404, t("Make sure index.php/user returns a 'page not found'.")); + } +} + |