Skip to content
Snippets Groups Projects
Verified Commit 54757a43 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 19c608d5
No related branches found
No related tags found
3 merge requests!11769Issue #3517987: Add option to contextual filters to encode slashes in query parameter.,!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...
Pipeline #237063 passed
Pipeline: drupal

#237067

    ...@@ -40,6 +40,11 @@ protected function setUp(): void { ...@@ -40,6 +40,11 @@ protected function setUp(): void {
    * Ensures that entity types with bundles do not break following entity types. * Ensures that entity types with bundles do not break following entity types.
    */ */
    public function testFieldUIRoutes(): void { 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([ $this->drupalLogin($this->drupalCreateUser([
    'administer account settings', 'administer account settings',
    'administer entity_test_no_id fields', 'administer entity_test_no_id fields',
    ...@@ -126,13 +131,4 @@ public function assertLocalTasks(): void { ...@@ -126,13 +131,4 @@ public function assertLocalTasks(): void {
    $this->assertSession()->linkExists('Manage form display'); $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.');
    }
    } }
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment