public function FieldUIRouteTest::testAdminRoute in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/field_ui/src/Tests/FieldUIRouteTest.php \Drupal\field_ui\Tests\FieldUIRouteTest::testAdminRoute()
Asserts that admin routes are correctly marked as such.
File
- core/
modules/ field_ui/ src/ Tests/ FieldUIRouteTest.php, line 119 - Contains \Drupal\field_ui\Tests\FieldUIRouteTest.
Class
- FieldUIRouteTest
- Tests the functionality of the Field UI route subscriber.
Namespace
Drupal\field_ui\TestsCode
public function testAdminRoute() {
$route = \Drupal::service('router.route_provider')
->getRouteByName('entity.entity_test.field_ui_fields');
$is_admin = \Drupal::service('router.admin_context')
->isAdminRoute($route);
$this
->assertTrue($is_admin, 'Admin route correctly marked for "Manage fields" page.');
}