You are here

IndexPhpTest.php in Drupal 8

Same filename and directory in other branches
  1. 9 core/modules/system/tests/src/Functional/System/IndexPhpTest.php

File

core/modules/system/tests/src/Functional/System/IndexPhpTest.php
View source
<?php

namespace Drupal\Tests\system\Functional\System;

use Drupal\Tests\BrowserTestBase;

/**
 * Tests the handling of requests containing 'index.php'.
 *
 * @group system
 */
class IndexPhpTest extends BrowserTestBase {

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  protected function setUp() {
    parent::setUp();
  }

  /**
   * Test index.php handling.
   */
  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);
  }

}

Classes

Namesort descending Description
IndexPhpTest Tests the handling of requests containing 'index.php'.