#1380958: Replace $modules list for WebTestBase::setUp() with ::$modules class properties changed how tests declare which modules they depend on. See the change record.
First, assign the issue to yourself, both on the issue and by editing your name into this issue summary table.
For each test class:
- Find the
setUp()
method. - If it passes
parent::setUp()
an array of modules, add the following at the top of the class, above any other methods or properties:
class FooBase extends WebTestBase { /** * Modules to enable. * * @var array */ public static $modules = array();
Make sure there is a blank line between the class declaration and the docblock.
- Note which modules are passed to
parent::setUp()
, and move them to the$modules
array above. Do not removeparent::setUp()
; just remove its parameters. - Move any documentation about the enabled modules (in either an inline comment or a docblock) to the docblock for
$modules
instead. - If the setUp() method is empty except for this line, remove it completely.
You can use this bash command to find relevant setUp() methods: grep -nr "parent::setUp([^)]" *
Once all those are done, commit #1711076: Remove setUp as a means of enabling modules
Comment | File | Size | Author |
---|---|---|---|
#14 | drupal-1711070-14.patch | 261.62 KB | tim.plunkett |
#14 | interdiff.txt | 1.37 KB | tim.plunkett |
#12 | drupal-1711070-12.patch | 260.25 KB | tim.plunkett |
#10 | drupal-1711070-10.patch | 260.12 KB | tim.plunkett |
#8 | drupal-1711070-8.patch | 259.19 KB | tim.plunkett |
Comments
Comment #0.0
tim.plunkettput ol around steps
Comment #1
sunThanks! Slightly adjusting title and tagging.
Comment #1.0
sunadded #1711076
Comment #1.1
tim.plunkettUpdated issue summary.
Comment #1.2
tim.plunkettUpdated issue summary.
Comment #1.3
tim.plunkettUpdated issue summary.
Comment #1.4
tim.plunkettUpdated issue summary.
Comment #1.5
tim.plunkettUpdated issue summary.
Comment #1.6
tim.plunkettUpdated issue summary.
Comment #1.7
tim.plunkettUpdated issue summary.
Comment #1.8
tim.plunkettUpdated issue summary.
Comment #1.9
tim.plunkettUpdated issue summary.
Comment #1.10
tim.plunkettUpdated issue summary.
Comment #1.11
xjm.
Comment #1.12
xjmUpdated issue summary.
Comment #1.13
tim.plunkettUpdated issue summary.
Comment #1.14
tim.plunkettadded kid_icarus
Comment #1.15
tim.plunkettadded instruction about assigning
Comment #1.16
tim.plunkettUpdated issue summary.
Comment #1.17
tim.plunkettUpdated issue summary.
Comment #1.18
kid_icarus CreditAttribution: kid_icarus commentedAdded kid_icarus to comment module
Comment #1.19
kid_icarus CreditAttribution: kid_icarus commentedAdded kid_icarus to config module
Comment #1.20
kid_icarus CreditAttribution: kid_icarus commentedAdded kid_icarus to contact module
Comment #1.21
kid_icarus CreditAttribution: kid_icarus commentedAdded kid_icarus to contextual module
Comment #1.22
kid_icarus CreditAttribution: kid_icarus commentedAdded kid_icarus to entity module
Comment #1.23
kid_icarus CreditAttribution: kid_icarus commentedAdded kid_icarus to field module
Comment #1.24
kid_icarus CreditAttribution: kid_icarus commentedAdded kid_icarus to field_ui module
Comment #1.25
tim.plunkettUpdated issue summary.
Comment #1.26
kid_icarus CreditAttribution: kid_icarus commentedAdded kid_icarus to filter module
Comment #1.27
kid_icarus CreditAttribution: kid_icarus commentedAdded kid_icarus to forum module
Comment #1.28
kid_icarus CreditAttribution: kid_icarus commentedAdded kid_icarus to help module
Comment #1.29
kid_icarus CreditAttribution: kid_icarus commentedAdded kid_icarus to php module
Comment #1.30
xjmUpdated issue summary.
Comment #1.31
xjmUpdated issue summary.
Comment #2
xjmUpdated the summary with instructions that conform to our coding standards from http://drupal.org/node/1354#classes.
Comment #2.0
xjmUpdated issue summary.
Comment #2.1
ZenDoodles CreditAttribution: ZenDoodles commentedUpdated issue summary.
Comment #2.2
xjm.
Comment #2.3
Cameron Tod CreditAttribution: Cameron Tod commentedAssigned myself to the locale module.
Comment #2.4
xjmUpdated issue summary.
Comment #2.5
xjmUpdated issue summary.
Comment #2.6
tim.plunkettUpdated issue summary.
Comment #2.7
tim.plunkettUpdated issue summary.
Comment #2.8
tim.plunkettUpdated issue summary.
Comment #2.9
tim.plunkettUpdated issue summary.
Comment #2.10
xjmUpdated issue summary.
Comment #2.11
Cameron Tod CreditAttribution: Cameron Tod commentedAssigned myself to system.module.
Comment #3
webchickIs there any way we could get just one mega-patch with all of these? This is currently clobbering the RTBC queue with 500 issues that are each going to take 1-2 minutes to process.
Comment #4
Cameron Tod CreditAttribution: Cameron Tod commentedShould we wait till they are all RTBC individually, then roll the patches up together?
Comment #4.0
kid_icarus CreditAttribution: kid_icarus commentedAssigned kid_icarus to path module
Comment #5
tim.plunkettAll but three of the issues were RTBC, and I personally reviewed and finished those.
Here's the whole thing.
Comment #6
tim.plunkettComment #8
tim.plunkett#1658712: Refactor test_entity schema to be multilingual was JUST committed, rerolled.
Comment #9
tim.plunkettI also need to roll in #1711076: Remove setUp as a means of enabling modules, waiting for the bot in case I need to clean anything else up.
Comment #10
tim.plunkettThis should be the final patch.
Since this was split over many issues, here is the list of people to give credit to:
kid_icarus, tim.plunkett, xjm, droplet, zendoodles and cam8001
Comment #12
tim.plunkettForgot to instantiate $modules in WebTestBase.
Comment #14
tim.plunkettMy grep search failed! Adjusted to
grep -nr "::setUp([^)]" *
and caught another one.CommentNodeAccessTest was doing some weird stuff in avoiding CommentTestBase, I cleaned that up.
Comment #15
tim.plunkettOne more reminder for committers!
This is the list of those who worked on the individual issues:
kid_icarus, tim.plunkett, xjm, droplet, zendoodles and cam8001
Comment #16
webchickI did a quick check of the avoid commit conflicts tag and only found two open issues, one for D7 and the other that's NW.
Committed and pushed to 8.x. Thanks a bunch!
The change notice was already covered in the other issue, so this should be able to be just fixed.