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.
Problem/Motivation
#3263654: Move all HAL tests to the module in preparation of removal in D10 moved all HAL tests out of the module, but some of them were generic tests using HAL rather than tests of HAL, so we need to move them back and refactor to use regular json to avoid losing test coverage.
RestRegisterUserTests
from user module is one.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#12 | interdiff_4-12.txt | 464 bytes | murilohp |
#12 | 3268105-12.patch | 8.29 KB | murilohp |
| |||
#5 | diff_RestRegisterUserTest_UserRegistrationRestTest.txt | 2.49 KB | murilohp |
#4 | 3268105-4.patch | 8.29 KB | murilohp |
Comments
Comment #3
catchCrediting TR who spotted this.
Comment #4
murilohp CreditAttribution: murilohp at CI&T commentedThis issue is blocking #3055807: User created via /user/register?_format=json get blocked, so I just rollback
RestRegisterUserTest
into the user module and removed the hal integration, the filename is nowUserRegistrationRestTest
, the idea of a new name is to follow the user's tests pattern.Comment #5
murilohp CreditAttribution: murilohp at CI&T commentedJust to help you out here with the review, here's a diff between the old test(
core/modules/hal/tests/src/Functional/user/RestRegisterUserTest.php
) and the new one(core/modules/user/tests/src/Functional/UserRegistrationRestTest.php
)Comment #6
TR CreditAttribution: TR commentedComment #7
bbralaSubmitted to early.
Comment #8
bbralaComment #9
bbralaI've gone through the changes and they are looking good. Ran test locally and they passed also. I did this for d9 and d10.
The testfailure on 10.0.x is not related to this change so setting RTBC while we wait for green tests.
Comment #10
SpokjeSorry to be the nit-picker, but I have 1 _very_ minor comment:
Can we have "rest" in CAPS here, to fit in with the rest *baduum-tish* of Core?
Comment #11
bbralaNot entirely true, but seems to be the prevalent version by far. :P (only found one lowercase in a quick search in
CsrfRequestHeaderAccessCheck.php
)Comment #12
murilohp CreditAttribution: murilohp at CI&T commentedAddressing #10 here.
Comment #13
murilohp CreditAttribution: murilohp at CI&T commentedComment #14
bbralaWell done, thanks.
Comment #15
SpokjeThanks @murilohp!
RTBC if TestBot agrees
INSTA-EDIT: ^What @bbrala said...
Comment #16
alexpottCommitted f73d11a and pushed to 10.0.x. Thanks!
Backported to 9.4.x so the test is in 9 and 10.