Closed (fixed)
Project:
SimpleTest
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
9 Mar 2008 at 22:58 UTC
Updated:
4 Apr 2008 at 23:32 UTC
Jump to comment: Most recent file
This patch uses the curl, dom and simplexml extensions. I have compatibility.php, dumper.php, exceptions.php, invoker.php, reporter.php simpletest.php, unit_tester.php, xml.php, default_reporter.php, errors.php, expectation.php, reflection_php5.php, scorer.php, test_case.php and VERSION in my simpletest dir and it works. A some of the code now comes from UnitTestCase instead of reimplementing. The Drupal interface did not change -- if you used $this->_browser , well, that's not good.
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | php5powah_tests.patch | 103.66 KB | chx |
| #16 | php5powah_tests.patch | 97.16 KB | chx |
| #15 | php5powah_tests.patch | 96.97 KB | chx |
| #12 | php5powah_tests.patch | 82.24 KB | chx |
| #11 | php5powah_tests.patch | 81.77 KB | chx |
Comments
Comment #1
chx commentedThere was a setbrowser call in user tests. That's trivial to reimplement.
Comment #2
boombatower commentedThis needs be rerolled.
Comment #3
chx commentedHere it is. Much smaller... lots of whitespace changes not included.
Comment #4
pwolanin commentedok, so from chx, the easiest way to setup to test this is to move the Soureforge version to somewhere else and just copy the files listed at the top to simpletest/simpletest
After fixing the .info file (note error in patch 7.x->6.x) A quick check on 7.x (HEAD) is functional; however, problems with the poll module tests (the only ones I ran):
51 passes, 16 fails and 0 exceptions.
even after adding
$this->elements = FALSE;to curlExec in drupal_test_case.php as suggested by chxComment #5
dries commentedNot sure where I can provide feedback on the changes necessary to get simpletest, or a deriviate thereof, in core. One of the small things that annoy me is the
descfield used in theget_infohook. For consistency with core, that should be calleddescriptioninstead ofdesc.Edit: opened a separate issue at http://drupal.org/node/235013 . [chx]
Comment #6
chx commentedpoll now passes thanks to a generic fix in
handleFormofSELECTelements.Comment #7
chx commentedNow it handles forms without a selected option. Added a TODO "handle multiple selected in a multiple SELECT" -- I will deal with that later (much later. very low priority).
Comment #8
chx commentedNow it handles when the value and the displayed label of an option to be changed are different. This one was easy... Edit:
$edit[$name] == $optionwas changed to$edit[$name] == $option['value']which is better in code understanding too because the former contained an implicit string cast.Comment #9
chx commentedThis version goes over all the tests with a number of failures yes but no PHP fatals.
Comment #10
chx commentedThis one improves on checkbox and radio handling so filter tests pass. there are a few failures still, with node tests, working on that, too. checkbox could be more elegant.
Comment #11
chx commentedLots of fixes. filter, node, comments, block pass... locale has 1 failure, poll and book has more... but still, we are a lot better. biggest change change is that multiple forms on one page are now actually working thanks to adding a few dots to the handleForm xpath.
Comment #12
chx commentedMeh, I could not go to sleep before poll was fixed -- curious that it broke 'cos it was poll test that was broken.
Comment #13
boombatower commentedPossibly change the message in the
handleFormfunction.to
Example:
Obviously nothing big.
Other small thing: the patch change the info file core to 6.x. Technically this will all be committed to HEAD (7.x).
Other than that it is looking nice.
From the looks of the patch it appears you are fixing general things as well. Just trying to keep it straight for record.
Comment #14
pwolanin commentedpatch fails on simpletest HEAD checkout
Comment #15
chx commentedThis one has most tests pass due to much better form handling. Profile has a few failures but... is a form a field? I do not think so. Poll tests, quite interestingly tends to break utterly if not run alone -- this has nothing to do with my changes, I would like to think 'cos even the theming of bars fail... when run alone, they pass. User registration also has failures I am studying those but I wanted to have this out.
Comment #16
chx commentedWell, user had a broken drupalGet and my code had no form action handling. Both are fixed, here.
Comment #17
chx commentedNote that though contact has two fails that is a core bug and not my code here.
Comment #18
chx commentedAnd now, translations pass as we now deal with the case when form actions contain queries. And, thanks to code reuse this makes clickLink works in the same case.
Comment #19
boombatower commentedWhen I run any tests that uses a form (which should be all of them) it generates the following exception many times.
Code:
I'm going to guess that
$handledneeded to be initialized, but it doesn't appear that$handledis used in the code anymore. Possibly just left over?Tests run fine without it:
Comment #20
boombatower commentedI made the change above and committed.
Comment #21
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.