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.
Comment | File | Size | Author |
---|---|---|---|
#16 | permutations-documentation-1670312-16.patch | 563 bytes | oriol_e9g |
#6 | 1670312-6.patch | 612 bytes | dsdeiz |
#6 | 7.x-1670312-6-do-not-test.patch | 564 bytes | dsdeiz |
#2 | 1670312-2.patch | 609 bytes | dsdeiz |
#2 | 7.x-1670312-2.patch | 555 bytes | dsdeiz |
Comments
Comment #1
jhodgdonGood 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...
Comment #2
dsdeiz CreditAttribution: dsdeiz commentedPatch attached.
Comment #4
tstoecklerLooks good. Cool :-)
Comment #5
tstoecklerOh 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)
Comment #6
dsdeiz CreditAttribution: dsdeiz commentedPatches attached.
Comment #7
technicalknockout CreditAttribution: technicalknockout commentedUpdating project field to Documentation - where the documentation code resides that needs to be patched.
Comment #8
technicalknockout CreditAttribution: technicalknockout commentedOops, nevermind this is in the Drupal core code itself. apologies
Comment #9
jhodgdonVery 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.
Comment #10
jhodgdonThe commit will probably need to wait until this issue is fixed:
#1541958: Split setUp() into specific sub-methods
Comment #11
tstoecklerRe #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.
Comment #12
jhodgdonI 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. :(
Comment #13
tstoecklerYes, I do too. But who has the time to run the full suite these days. :-)
Comment #14
jhodgdonStill RTBC, but commit needs to wait on #1541958: Split setUp() into specific sub-methods
Comment #15
jhodgdonThat 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
Comment #16
oriol_e9gComment #17
tstoecklerLooks good.
Comment #18
jhodgdonThanks! 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.
Comment #19
webchickI just checked and these two patches do not conflict.
Therefore, committed and pushed to 7.x. Thanks!