function NodeAliasedRouteTest::testNodeAddPageRouteAlias
Test URL generation using node.add_page matches entity.node.add_page.
File
-
core/
modules/ node/ tests/ src/ Kernel/ NodeAliasedRouteTest.php, line 39
Class
- NodeAliasedRouteTest
- Tests aliased Node routes.
Namespace
Drupal\Tests\node\KernelCode
public function testNodeAddPageRouteAlias() : void {
$url_for_current_route = Url::fromRoute('entity.node.add_page')->toString();
$url_for_bc_route = Url::fromRoute('node.add_page')->toString();
$this->assertSame($url_for_current_route, $url_for_bc_route);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.