Skip to content
Snippets Groups Projects
Verified Commit 77686992 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3469576 by pooja_sharma, catch: Speed up RevisionRevertFormTest

parent ee585649
No related branches found
No related tags found
20 merge requests!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!9470[10.3.x-only-DO-NOT-MERGE]: #3331771 Fix file_get_contents(): Passing null to parameter,!8736Update the Documention As per the Function uses.,!8513Issue #3453786: DefaultSelection should document why values for target_bundles NULL and [] behave as they do,!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3742Issue #3328429: Create item list field formatter for displaying ordered and unordered lists,!3731Claro: role=button on status report items,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3133core/modules/system/css/components/hidden.module.css,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2062Issue #3246454: Add weekly granularity to views date sort,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!877Issue #2708101: Default value for link text is not saved,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493
Pipeline #262458 passed
Pipeline: drupal

#262487

    Pipeline: drupal

    #262476

      Pipeline: drupal

      #262464

        ...@@ -43,6 +43,19 @@ protected function setUp(): void { ...@@ -43,6 +43,19 @@ protected function setUp(): void {
        $this->drupalPlaceBlock('page_title_block'); $this->drupalPlaceBlock('page_title_block');
        } }
        /**
        * Test form revision revert.
        */
        public function testFormRevisionRevert(): void {
        foreach (self::providerPageTitle() as $page_title) {
        $this->testPageTitle($page_title[0], $page_title[1]);
        }
        $this->testAccessRevertLatestDefault();
        $this->testAccessRevertLatestForwardRevision();
        $this->testAccessRevertNonLatest();
        $this->testPrepareRevision();
        }
        /** /**
        * Tests title by whether entity supports revision creation dates. * Tests title by whether entity supports revision creation dates.
        * *
        ...@@ -50,11 +63,8 @@ protected function setUp(): void { ...@@ -50,11 +63,8 @@ protected function setUp(): void {
        * The entity type to test. * The entity type to test.
        * @param string $expectedQuestion * @param string $expectedQuestion
        * The expected question/page title. * The expected question/page title.
        *
        * @covers ::getQuestion
        * @dataProvider providerPageTitle
        */ */
        public function testPageTitle(string $entityTypeId, string $expectedQuestion): void { protected function testPageTitle(string $entityTypeId, string $expectedQuestion): void {
        /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */ /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */
        $storage = \Drupal::entityTypeManager()->getStorage($entityTypeId); $storage = \Drupal::entityTypeManager()->getStorage($entityTypeId);
        ...@@ -88,7 +98,7 @@ public function testPageTitle(string $entityTypeId, string $expectedQuestion): v ...@@ -88,7 +98,7 @@ public function testPageTitle(string $entityTypeId, string $expectedQuestion): v
        /** /**
        * Data provider for testPageTitle. * Data provider for testPageTitle.
        */ */
        public static function providerPageTitle(): array { protected static function providerPageTitle(): array {
        return [ return [
        ['entity_test_rev', 'Are you sure you want to revert the revision?'], ['entity_test_rev', 'Are you sure you want to revert the revision?'],
        ['entity_test_revlog', 'Are you sure you want to revert to the revision from Sun, 11 Jan 2009 - 16:00?'], ['entity_test_revlog', 'Are you sure you want to revert to the revision from Sun, 11 Jan 2009 - 16:00?'],
        ...@@ -100,7 +110,7 @@ public static function providerPageTitle(): array { ...@@ -100,7 +110,7 @@ public static function providerPageTitle(): array {
        * *
        * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess
        */ */
        public function testAccessRevertLatestDefault(): void { protected function testAccessRevertLatestDefault(): void {
        /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */
        $entity = EntityTestRev::create(); $entity = EntityTestRev::create();
        $entity->setName('revert'); $entity->setName('revert');
        ...@@ -119,7 +129,7 @@ public function testAccessRevertLatestDefault(): void { ...@@ -119,7 +129,7 @@ public function testAccessRevertLatestDefault(): void {
        * *
        * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess
        */ */
        public function testAccessRevertLatestForwardRevision(): void { protected function testAccessRevertLatestForwardRevision(): void {
        /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */
        $entity = EntityTestRevPub::create(); $entity = EntityTestRevPub::create();
        $entity->setName('revert'); $entity->setName('revert');
        ...@@ -143,7 +153,7 @@ public function testAccessRevertLatestForwardRevision(): void { ...@@ -143,7 +153,7 @@ public function testAccessRevertLatestForwardRevision(): void {
        * *
        * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess
        */ */
        public function testAccessRevertNonLatest(): void { protected function testAccessRevertNonLatest(): void {
        /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */
        $entity = EntityTestRev::create(); $entity = EntityTestRev::create();
        $entity->setName('revert'); $entity->setName('revert');
        ...@@ -276,7 +286,7 @@ public static function providerSubmitForm(): array { ...@@ -276,7 +286,7 @@ public static function providerSubmitForm(): array {
        * *
        * @covers ::prepareRevision * @covers ::prepareRevision
        */ */
        public function testPrepareRevision(): void { protected function testPrepareRevision(): void {
        $user = $this->createUser(); $user = $this->createUser();
        $this->drupalLogin($user); $this->drupalLogin($user);
        ......
        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