- Issue created by @jonathanshaw
- π¬π§United Kingdom jonathanshaw Stroud, UK
RegistrationAccessTest creates a user (and doesn't use it) in setUp() in order to avoid this problem, so that this unused user is the superuser.
- @jonathanshaw opened merge request.
- π¬π§United Kingdom jonathanshaw Stroud, UK
It's kind of an annoying issue, but I think what I'm doing here is right. Tests that have an implict dependency on the hidden mystic powers of the superuser are easy to get wrong, it's better to be very explicit about the user and their permissions. The proof of this is in modules/registration_waitlist/tests/src/Kernel/RegistrationWaitListStateTransitionAccessTest.php which actually wasn't testing what it looked like it was testing, because the superuser was making the test too easy to pass.
- π¬π§United Kingdom jonathanshaw Stroud, UK
Even more signficantly, addressing this surfaced a significant bug in RegistrationOverrideChecker that prevented anyone from overriding the maximum spaces constraint.
- πΊπΈUnited States john.oltman
It's kind of an annoying issue, but I think what I'm doing here is right.
Totally agree. Thanks for all the work you are putting in.
-
john.oltman β
committed 2b782602 on 3.3.x authored by
jonathanshaw β
#3480028 by jonathanshaw: Many kernel tests depend on super user status
-
john.oltman β
committed 2b782602 on 3.3.x authored by
jonathanshaw β
-
john.oltman β
committed 4fd029a1 on 3.1.x authored by
jonathanshaw β
#3480028 by jonathanshaw: Many kernel tests depend on super user status
-
john.oltman β
committed 4fd029a1 on 3.1.x authored by
jonathanshaw β
Automatically closed - issue fixed for 2 weeks with no activity.