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
O! Ye olde FlagSimpleTest! Ye were the teste first claf we created, but yay, ye time has cometh.
FlagSimpleTest started as a test for the most default settings of Flag, but many of these cases are now moved to other test classes.
Proposed resolution
Refactor away FlagSimpleTest to more functionality-specific test classes.
Remaining tasks
Fix the following child issues.
#2619226: Remove flag count tests from FlagSimpleTest
#2702899: Create LinkPermissionAccessTest
#2702911: Create Deletion Test Class
Then remove FlagSimpleTest itself.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#6 | deleteFlagSimpleTest_2702043.6.patch | 4.74 KB | socketwench |
|
Comments
Comment #2
joachim CreditAttribution: joachim commented+1, but didn't I already file an issue for this ages ago?
I've certainly been gradually whittling away at FlagSimpleTest over the last few months and moving bits to other classes.
Comment #3
socketwench CreditAttribution: socketwench at FFW commentedI think you did: #2564461: rationalize & clean up test classes
It seemed, though, that patch was so big that no one really worked on it afterward. Now we're taking a more nibble-away at it approach and we're making progress.
Comment #4
socketwench CreditAttribution: socketwench at FFW commentedTurns out there are only three tests we need to move to kill FlagSimpleTest.
#2619226: Remove flag count tests from FlagSimpleTest
#2702899: Create LinkPermissionAccessTest
#2702911: Create Deletion Test Class
Comment #5
martin107 CreditAttribution: martin107 commentedComment #6
socketwench CreditAttribution: socketwench at FFW commentedLooking at it now, there's no point to FlagSimpleTest any longer. We create the flag with the form all over the place (via FlagTestBase), and all of the counts tests are now in FlagCountsTest and much better organized. Let's just remove the class and be done with it.
Comment #7
martin107 CreditAttribution: martin107 commentedI am happy with this. +1
Comment #8
socketwench CreditAttribution: socketwench at FFW commentedI realized after posting this that there is just one check we do in FlagSimpleTest that we don't do anywhere else: checking for the lack of anonymous flag operation.
I've created the following issue, but it's currently experiencing failures: #2715473: Create FlagPermissionTest
Comment #10
socketwench CreditAttribution: socketwench at FFW commentedNow that we have FlagPermissionsTest, there is absolutely no point to FlagSimpleTest.
It's dead now.