function RouterTest::testControllerResolutionPage
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Routing/RouterTest.php \Drupal\Tests\system\Functional\Routing\RouterTest::testControllerResolutionPage()
- 8.9.x core/modules/system/tests/src/Functional/Routing/RouterTest.php \Drupal\Tests\system\Functional\Routing\RouterTest::testControllerResolutionPage()
- 11.x core/modules/system/tests/src/Functional/Routing/RouterTest.php \Drupal\Tests\system\Functional\Routing\RouterTest::testControllerResolutionPage()
Checks that a request with text/html response gets rendered as a page.
File
-
core/
modules/ system/ tests/ src/ Functional/ Routing/ RouterTest.php, line 218
Class
- RouterTest
- Functional class for the full integrated routing system.
Namespace
Drupal\Tests\system\Functional\RoutingCode
public function testControllerResolutionPage() : void {
$this->drupalGet('/router_test/test10');
$this->assertSession()
->pageTextContains('abcde');
// Confirm that the page wrapping is being added, so we're not getting a
// raw body returned.
$this->assertSession()
->responseContains('</html>');
// In some instances, the subrequest handling may get confused and render
// a page inception style. This test verifies that is not happening.
$this->assertSession()
->responseNotMatches('#</body>.*</body>#s');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.