You are here

public function IndexPhpTest::testIndexPhpHandling in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Functional/System/IndexPhpTest.php \Drupal\Tests\system\Functional\System\IndexPhpTest::testIndexPhpHandling()
  2. 10 core/modules/system/tests/src/Functional/System/IndexPhpTest.php \Drupal\Tests\system\Functional\System\IndexPhpTest::testIndexPhpHandling()

Test index.php handling.

File

core/modules/system/tests/src/Functional/System/IndexPhpTest.php, line 26

Class

IndexPhpTest
Tests the handling of requests containing 'index.php'.

Namespace

Drupal\Tests\system\Functional\System

Code

public function testIndexPhpHandling() {
  $index_php = $GLOBALS['base_url'] . '/index.php';
  $this
    ->drupalGet($index_php, [
    'external' => TRUE,
  ]);
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->drupalGet($index_php . '/user', [
    'external' => TRUE,
  ]);
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}