class IndexPhpTest
Same name and namespace in other branches
- 11.x core/modules/system/tests/src/Functional/System/IndexPhpTest.php \Drupal\Tests\system\Functional\System\IndexPhpTest
Tests the handling of requests containing 'index.php'.
@group system
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\system\Functional\System\IndexPhpTest implements \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of IndexPhpTest
File
-
core/
modules/ system/ tests/ src/ Functional/ System/ IndexPhpTest.php, line 12
Namespace
Drupal\Tests\system\Functional\SystemView source
class IndexPhpTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
}
/**
* Tests 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);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.