public function FormModeManagerRouteTest::testAdminRoutes in Form mode manager 8
Asserts that admin routes are correctly marked as such.
@dataProvider providerAdminRoutes
Parameters
string $route_name: The route name expected.
File
- tests/
src/ Functional/ FormModeManagerRouteTest.php, line 286
Class
- FormModeManagerRouteTest
- Tests the routes generated by form_mode_manager.
Namespace
Drupal\Tests\form_mode_manager\FunctionalCode
public function testAdminRoutes($route_name) {
$route = \Drupal::service('router.route_provider')
->getRouteByName($route_name);
$is_admin = \Drupal::service('router.admin_context')
->isAdminRoute($route);
$this
->assertTrue($is_admin, 'Admin route correctly marked for "Form Mode Manager settings" pages.');
}