1 system.test | SystemIndexPhpTest::testIndexPhpHandling() |
Test index.php handling.
File
- core/
modules/ system/ tests/ system.test, line 2638 - Tests for system.module.
Class
- SystemIndexPhpTest
- Test the handling of requests containing 'index.php'.
Code
function testIndexPhpHandling() {
$this->backdropGet('<front>');
$this->assertResponse(200, 'Make sure the home page returns a valid page.');
$index_php = $GLOBALS['base_url'] . '/index.php';
$this->backdropGet($index_php, array('external' => TRUE));
$this->assertResponse(200, 'Make sure index.php returns a valid page.');
$this->backdropGet($index_php, array('external' => TRUE, 'query' => array('q' => 'user')));
$this->assertResponse(200, 'Make sure index.php?q=user returns a valid page.');
$this->backdropGet($index_php . '/user', array('external' => TRUE));
$this->assertResponse(404, "Make sure index.php/user returns a 'page not found'.");
}