Posted by bfroehle on September 8, 2011 at 11:20pm
5 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | simpletest.module |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | needs backport to D7 |
Issue Summary
From #520106-132: Allow setting the active menu trail for dynamically-generated menu paths., apparently classes which inherit from DrupalWebTestCase need to have the following function signature for setUp:
function setUp() {
// ...
}In FieldAttachTestCase, the signature is
function setUp($modules = array()) {
// ...
}Instead we should use something like
function setUp() {
$modules = func_get_args();
if (isset($modules[0]) && is_array($modules[0])) {
$modules = $modules[0];
}
// ...
Comments
#1
Code borrowed from DrupalWebTestCase::setUp(), of course.
#2
This should be trivial to review and fixes an E_STRICT warning.
#3
That's 100% correct. Thank you!
#4
#1: FieldAttachTestCase-1273722-1.patch queued for re-testing.
#5
Committed/pushed to 8.x, will need a quick re-roll for 7.x.
#6
Quick re-roll for D7...
$ curl http://drupal.org/files/FieldAttachTestCase-1273722-1.patch | git apply -p2 --index#7
Huh. Weird. I thought we changed DWTC::setUp() some time ago to take $modules as a parameter and get away from the function_get_args() way. Hm. Well, ok, then...
Committed and pushed to 7.x. Thanks!
#8
Automatically closed -- issue fixed for 2 weeks with no activity.