Verified Commit b3667201 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3460654 by pooja_sharma, FeyP, catch: Merge test methods in...

Issue #3460654 by pooja_sharma, FeyP, catch: Merge test methods in FieldUIRouteTest for better performance

(cherry picked from commit 302ee049)
parent d3d8ab00
Loading
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -40,6 +40,11 @@ protected function setUp(): void {
   * Ensures that entity types with bundles do not break following entity types.
   */
  public function testFieldUIRoutes(): void {
    $route = \Drupal::service('router.route_provider')->getRouteByName('entity.entity_test.field_ui_fields');
    $is_admin = \Drupal::service('router.admin_context')->isAdminRoute($route);
    // Asserts that admin routes are correctly marked as such.
    $this->assertTrue($is_admin, 'Admin route correctly marked for "Manage fields" page.');

    $this->drupalLogin($this->drupalCreateUser([
      'administer account settings',
      'administer entity_test_no_id fields',
@@ -126,13 +131,4 @@ public function assertLocalTasks(): void {
    $this->assertSession()->linkExists('Manage form display');
  }

  /**
   * Asserts that admin routes are correctly marked as such.
   */
  public function testAdminRoute(): void {
    $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.');
  }

}