Fix tests and restore redirection test

Created on 10 September 2024, 7 months ago
Updated 11 September 2024, 7 months ago

It seems the tests in gitlab are currently broken.
Also, changes in #3080124: Pending messages should be postponed to the destination page disabled the redirection test, now in \Drupal\Tests\entity_legal\Functional\RedirectMethodTest::testRedirectMethod

📌 Task
Status

Fixed

Version

4.0

Component

Code

Created by

🇧🇪Belgium herved

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @herved
  • Merge request !27Restore and update redirection test. → (Merged) created by herved
  • Pipeline finished with Failed
    7 months ago
    Total: 218s
    #279247
  • 🇧🇪Belgium herved

    Phpunit is failing because there is a broken/wrong serialized value in modules/contrib/entity_legal/tests/fixtures/update/install_entity_legal.php:88

    We can verify this by throwing the exception in \Drupal\Core\KeyValueStore\DatabaseStorage::getMultiple instead of muting it. See this https://3v4l.org/mr8AW
    It fails on PHP 8.3 but not on lower versions, which explains the issue.
    I will fix it in this MR.

  • Pipeline finished with Success
    7 months ago
    Total: 218s
    #279602
  • Status changed to Needs review 7 months ago
  • Status changed to Needs work 7 months ago
  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    Looks good, thank you!

    Here are some issues I think we can fix:

    • Let's enforce PHPCS, PHPStan by adding to .gitlab-ci.yml:
        phpstan:
          allow_failure: false
        phpcs:
          allow_failure: false
        
    • Create a followup to fix and enforce cspell too
    • Resolve the issue with Drupal 11 failure in PHPStan and PHPUnit. If we cannot add : string to our method, let's drop it and create our own ::randomLowercaseMachineName()
  • Pipeline finished with Success
    7 months ago
    Total: 278s
    #280053
  • 🇧🇪Belgium herved

    Thanks @Claudiu,

    I propose to fix cspell here directly, but I can always create a new issue and move the commit there if you prefer.
    Most of those are obvious except I added exclusions for "please" from \Drupal\entity_legal\Plugin\EntityLegal\Message::execute, just in case site owners translated the string.

  • Pipeline finished with Success
    7 months ago
    Total: 245s
    #280130
  • Pipeline finished with Success
    7 months ago
    Total: 226s
    #280220
  • Status changed to Needs review 7 months ago
  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    Thank you!

  • Pipeline finished with Skipped
    7 months ago
    #280256
  • Status changed to Fixed 7 months ago
  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024