function SystemIndexPhpTest::testIndexPhpHandling
Test index.php handling.
File
-
modules/
system/ system.test, line 3016
Class
- SystemIndexPhpTest
- Test the handling of requests containing 'index.php'.
Code
function testIndexPhpHandling() {
$index_php = $GLOBALS['base_url'] . '/index.php';
$this->drupalGet($index_php, array(
'external' => TRUE,
));
$this->assertResponse(200, 'Make sure index.php returns a valid page.');
$this->drupalGet($index_php, array(
'external' => TRUE,
'query' => array(
'q' => 'user',
),
));
$this->assertResponse(200, 'Make sure index.php?q=user returns a valid page.');
$this->drupalGet($index_php . '/user', array(
'external' => TRUE,
));
$this->assertResponse(404, "Make sure index.php/user returns a 'page not found'.");
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.