Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is what I have so far. Works but there are two artefacts a) more choices do not work because of the way simpletest gets the page before posting it b) for some reason when testing poll votes, seems the system gets so happy over the relative success that it runs testPollCreate again. Fixing either is beyond me, so I hope Rok will take this over. Note this a Drupal-friendly test so some core bugs have been harmed while writing this :D
Comment | File | Size | Author |
---|---|---|---|
#9 | poll_module.test_.patch | 3.27 KB | Rok Žlender |
#7 | poll_test.patch | 5.42 KB | chx |
#6 | poll_test.patch | 5.62 KB | chx |
#5 | poll_test.patch | 4.87 KB | chx |
#4 | poll_test.patch | 4.65 KB | chx |
Comments
Comment #1
Rok Žlender CreditAttribution: Rok Žlender commentedI fixed a . Will take a look at b later.
There is no need to delete poll at the end as tearDown cleans up.
Comment #2
Rok Žlender CreditAttribution: Rok Žlender commentedComment #3
chx CreditAttribution: chx commentedI thought tearDown cleans up users and roles but not nodes.
Comment #4
chx CreditAttribution: chx commentedYour solution is simply ugly. Now I know how, I have a much better way: reusable and of course properly documented.
Comment #5
chx CreditAttribution: chx commentedAfter http://drupal.org/node/204996#comment-674432 will get in, the create test will work.
Comment #6
chx CreditAttribution: chx commentedThough B) remains now this is rather complete and I see nodes deleted created by the users to be cleaned up. Great. But then why are there two node_delete calls and with wrong arguments?
Comment #7
chx CreditAttribution: chx commentedDebug stuff removed.
Comment #8
chx CreditAttribution: chx commentedComment #9
Rok Žlender CreditAttribution: Rok Žlender commentedI made some changes to simpletest http://drupal.org/node/205892 which would help this test. First apply patch in http://drupal.org/node/205892 and then run this one.
Comment #10
Rok Žlender CreditAttribution: Rok Žlender commentedCommitted by accident in http://drupal.org/cvs?commit=94254 but it was good to go anyway.
Comment #11
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.