public function RouterTest::testControllerPlaceholdersDefaultValuesProvided in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Routing/RouterTest.php \Drupal\system\Tests\Routing\RouterTest::testControllerPlaceholdersDefaultValuesProvided()
Confirms that default placeholders in paths work correctly.
File
- core/
modules/ system/ src/ Tests/ Routing/ RouterTest.php, line 149 - Contains \Drupal\system\Tests\Routing\RouterTest.
Class
- RouterTest
- Functional class for the full integrated routing system.
Namespace
Drupal\system\Tests\RoutingCode
public function testControllerPlaceholdersDefaultValuesProvided() {
$this
->drupalGet('router_test/test4/barf');
$this
->assertResponse(200);
$this
->assertRaw('barf', 'The correct string was returned because the route was successful.');
// Confirm that the page wrapping is being added, so we're not getting a
// raw body returned.
$this
->assertRaw('</html>', 'Page markup was found.');
// In some instances, the subrequest handling may get confused and render
// a page inception style. This test verifies that is not happening.
$this
->assertNoPattern('#</body>.*</body>#s', 'There was no double-page effect from a misrendered subrequest.');
}