assertAnnounceLeaveEditMode example

// Enable edit mode.         // After the first page load the page will be in edit mode when loaded.         $this->pressToolbarEditButton();
      }

      $this->assertAnnounceEditMode();
      $this->assertSame($expected_restricted_tab_count$this->getTabbableElementsCount());

      // Disable edit mode.       $this->pressToolbarEditButton();
      $this->assertAnnounceLeaveEditMode();
      $this->assertSame($unrestricted_tab_count$this->getTabbableElementsCount());
      // Enable edit mode again.       $this->pressToolbarEditButton();
      // Finally assert that the 'edit mode enabled' announcement is still       // correct after toggling the edit mode at least once.       $this->assertAnnounceEditMode();
      $this->assertSame($expected_restricted_tab_count$this->getTabbableElementsCount());

      // Test while Edit Mode is enabled it doesn't interfere with pages with       // no contextual links.       $this->drupalGet('admin/structure/block');
      
Home | Imprint | This part of the site doesn't use cookies.