function LegacyFrontControllerTest::testSuccessfulFrontControllerRequest
Same name and namespace in other branches
- 11.x core/tests/Drupal/FunctionalTests/Bootstrap/LegacyFrontControllerTest.php \Drupal\FunctionalTests\Bootstrap\LegacyFrontControllerTest::testSuccessfulFrontControllerRequest()
Tests that a simple request is routed by the front-controller correctly.
File
-
core/
tests/ Drupal/ FunctionalTests/ Bootstrap/ LegacyFrontControllerTest.php, line 51
Class
- LegacyFrontControllerTest
- Tests that front-controllers without symfony/runtime keep working.
Namespace
Drupal\FunctionalTests\BootstrapCode
public function testSuccessfulFrontControllerRequest() : void {
$module_path = $this->getModulePath('legacy_front_controller_test');
$this->fileSystem
->copy($module_path . "/test_index.php.template", $module_path . "/test_index.php", FileExists::Replace);
try {
$this->drupalGet("{$this->baseUrl}/core/modules/system/tests/modules/legacy_front_controller_test/test_index.php/test");
} finally {
$this->fileSystem
->delete($module_path . "/test_index.php");
}
$this->assertSession()
->pageTextContains('Hello World');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.