While working on #988188: Restrict access to the (expensive) issue statistics pages, I noticed that all project and project_issue tests refused to run on my local machine, always resulting in an xdebug "max_nesting_levels" exceeded error.
I tracked it down to the way project and project_issue implement the setUp function:
// We can't call parent::setUp() with a single array argument, so we need
// this ugly call_user_func_array().
call_user_func_array(array($this, 'parent::setUp'), $modules);
...which doesn't seem to work on PHP 5.3 (results in an infinite loop). If I alter the above to...
// We can't call parent::setUp() with a single array argument, so we need
// this ugly call_user_func_array().
call_user_func_array(array('parent', 'setUp'), $modules);
...then the tests all run fine (although I'm guessing the above won't work in PHP < 5.3).
The good news is that #985470: Backport allowing modules as a single array parameter in setUp() landed, so setUp() now accepts a single array argument (at least in the Simpletest-6.x-2.x-dev branch), hence we can chuck out the hack!
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 0001-Issue-992892-by-mr.baileys-marvil07-Fixed-Tests-not-.patch | 1008 bytes | marvil07 |
| project-issue-dwtc-setup.patch | 797 bytes | mr.baileys |
Comments
Comment #1
marvil07 commentedI just avoided the first hunk. reasoning on #877562: PHP 5.3 compatibility for tests.
Comment #2
dwwConfirmed all tests are still passing in PHP 5.2. Pushed to master:
http://drupal.org/commitlog/commit/1894/890f94846ffea9dc9a43d7fdb8aafae0...
Thanks!
-Derek