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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Rok Žlender’s picture

FileSize
2.59 KB

I fixed a . Will take a look at b later.
There is no need to delete poll at the end as tearDown cleans up.

Rok Žlender’s picture

Status: Needs review » Needs work
chx’s picture

I thought tearDown cleans up users and roles but not nodes.

chx’s picture

FileSize
4.65 KB

Your solution is simply ugly. Now I know how, I have a much better way: reusable and of course properly documented.

chx’s picture

FileSize
4.87 KB

After http://drupal.org/node/204996#comment-674432 will get in, the create test will work.

chx’s picture

Status: Needs work » Needs review
FileSize
5.62 KB

Though 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?

chx’s picture

FileSize
5.42 KB

Debug stuff removed.

chx’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Rok Žlender’s picture

FileSize
3.27 KB

I 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.

Rok Žlender’s picture

Status: Needs review » Fixed

Committed by accident in http://drupal.org/cvs?commit=94254 but it was good to go anyway.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.