Posted by tstoeckler on July 3, 2012 at 10:28pm
8 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | documentation |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | needs backport to D7, Novice |
Issue Summary
API page: http://api.drupal.org/api/drupal/core%21modules%21simpletest%21lib%21Dru...
Enter a descriptive title (above) relating to TestBase::generatePermutations, then describe the problem you have found:
In the example code TestBase::permute() is called, when what is meant is the function itself, i.e. TestBase::generatePermutations. This is minor, but still a bit weird.
Comments
#1
Good catch! It looks like the method name was probably changed (there is no permute() method now), and the documentation wasn't updated.
This also applies to the D7 method:
http://api.drupal.org/api/drupal/modules!simpletest!drupal_web_test_case.php/function/DrupalTestCase%3A%3AgeneratePermutations/7
#2
Patch attached.
#3
The last submitted patch, 7.x-1670312-2.patch, failed testing.
#4
Looks good. Cool :-)
#5
Oh no, wait, sorry. I just checked, and generatePermutations() is actually a static method. So instead of
$this->generatePermutations($parameters)we should do
TestBase::generatePermutations($parameters)#6
Patches attached.
#7
Updating project field to Documentation - where the documentation code resides that needs to be patched.
#8
Oops, nevermind this is in the Drupal core code itself. apologies
#9
Very odd... Every place that generatePermutations is actually called in tests, it is called via $this->generatePermutations(), not TestBase::generatePermutations(). But it is a static method... I guess you can call it either way? Anyway, I'll get this committed to 7.x and 8.x.
#10
The commit will probably need to wait until this issue is fixed:
#1541958: Split setUp() into specific sub-methods
#11
Re #9: Yeah, for some reason PHP doesn't throw a fatal on that. Although IIRC it is an E_STRICT on PHP 5.3, but I guess noone runs tests with E_STRICT on 5.3.
#12
I wouldn't say that. When I am developing, I *always* run all my code and tests with E_STRICT. :) But I guess the test bot doesn't. :(
#13
Yes, I do too. But who has the time to run the full suite these days. :-)
#14
Still RTBC, but commit needs to wait on #1541958: Split setUp() into specific sub-methods
#15
That issue is back to 7.x, so I committed this patch to 8.x.
This patch now needs a re-roll for 7.x, but the commit to 7.x will need to wait for that issue to be fixed.
#1541958: Split setUp() into specific sub-methods
#16
#17
Looks good.
#18
Thanks! I'm afraid to commit this until #1563620: All unit tests blow up with a fatal error lands, in case of a conflict... but we'll get it in sometime soon.
#19
I just checked and these two patches do not conflict.
Therefore, committed and pushed to 7.x. Thanks!
#20
Automatically closed -- issue fixed for 2 weeks with no activity.