You are here

public function FormModeManagerRouteTest::testAdminRoutes in Form mode manager 8.2

Asserts that admin routes are correctly marked as such.

@dataProvider providerAdminRoutes

Parameters

string $route_name: The route name expected.

File

tests/src/Kernel/FormModeManagerRouteTest.php, line 71

Class

FormModeManagerRouteTest
Tests the routes generated by form_mode_manager.

Namespace

Drupal\Tests\form_mode_manager\Kernel

Code

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.');
}