Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Move generatePermutations out of testbase into a trait.
generatePermutations is needed for the conversion of simpletests to phpunit. Lets move it to a trait so tests can use it when needed.
Scope:
Move generatePermutations out of TestBase into a Trait
Make TestBase use that trait
Remove the usages in Unit and Kernel tests of the static call to the method and make them use the trait.
Comment | File | Size | Author |
---|---|---|---|
#10 | 2881012-10.patch | 7.06 KB | Lendude |
#10 | interdiff-2881012-2-10.txt | 1.06 KB | Lendude |
#2 | 2881012-2.patch | 7.1 KB | Lendude |
Comments
Comment #2
LendudeHere we go.
Comment #3
LendudeComment #4
dawehnerAren't permissions a user module feature?
Comment #5
LendudeYes they are, not sure what that has to do with this patch :)
It's 'Permutations' not 'permissions'.
Comment #6
dawehnerWell, this means that the trait should be part of user module ...
Comment #7
dawehnerI'm horrible, I totally misread it.
Comment #8
michielnugter CreditAttribution: michielnugter as a volunteer and at Synetic commentedSorry, found 2 nits.
Seems the example code wasn't updated on:
- TestBase::generatePermutations
- New array format
Comment #9
dawehner@michielnugter
Well, does that mean we should really touch it here? There is an issue to fix that bit.
Comment #10
LendudeI think this is the thing that needs a fix really, because that is just wrong after this change, and then we might as well update the array notation while we are at it, right?
Here we go.
Comment #11
dawehnerFair.
Comment #12
alexpottCommitted and pushed 4bd9426 to 8.4.x and eb88922 to 8.3.x. Thanks!
Backported to 8.3.x as this is test-only code and no API is changed.
TestBase::generatePermutations
still exists.Removed unused uses on commit.