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
In FlagSimpleTest, the doUserDeletionTest() method tests the deletion of flags when a user is deleted. We are trying to get rid of FlagSimpleTest.
Proposed resolution
Create a new test class. This need not be user centric, but test the deletion of both user and their flags, and an entity and its flags. Remove deUserDeletionTest() from FlagSimpleTest.
Remaining tasks
Create patch.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#14 | interdiff-2702911-12-14.txt | 535 bytes | martin107 |
#14 | deleteTest_2702911.14.patch | 5.5 KB | martin107 |
| |||
#12 | deleteTest_2702911.12.patch | 5.42 KB | socketwench |
| |||
#10 | deleteTest_2702911.10.patch | 5.13 KB | socketwench |
#4 | deleteTest_2702911.4.patch | 6.57 KB | martin107 |
|
Comments
Comment #2
socketwench CreditAttribution: socketwench at FFW commentedThis simply moves the test from FlagSimpleTest to a new test class. It does not add node deletion or flag deletion tests.
Comment #3
martin107 CreditAttribution: martin107 commentedNeeds Reroll ... I am working on this now.
Comment #4
martin107 CreditAttribution: martin107 commentedHere we go.
Comment #5
socketwench CreditAttribution: socketwench at FFW commentedMissing newline at the end of FlagDeletionTest.php. Other than that, it looks good so far. I'd like to add test cases for node deletion and then flag deletion too.
Comment #6
martin107 CreditAttribution: martin107 commentedComment #7
martin107 CreditAttribution: martin107 commentedmakes sense to me.
Comment #8
socketwench CreditAttribution: socketwench at FFW commentedComment #9
martin107 CreditAttribution: martin107 commentedSorry looks like I closed the wrong issue.
Comment #10
socketwench CreditAttribution: socketwench at FFW commentedNow that I think about it, there's not much reason to make a separate test here. Much of what I had in mind is already covered by FlagCountsTest. Let's just add the user test to the counts test.
Comment #12
socketwench CreditAttribution: socketwench at FFW commentedAdded missing schema statement.
Comment #13
BerdirComment #14
martin107 CreditAttribution: martin107 commentedConceptually it is good to see those test move into a kernel test , and FlagCountsTest is the obvious choice.
Practically speaking the patch looks good, all the relevant testing has been transferred cleanly.
I have only rerolled this patch - so plus one from me - I regard this as RTBC
I have only the smallest of polishes to make
FlagCountTest::testUserDeletion() has no annonation.
Comment #16
socketwench CreditAttribution: socketwench at FFW commentedThanks for the fixes, Martin!