56 passes, 47 fails and 2 exceptions.

Found the requested form at node/add/poll [Other] Fail
Failed to set field choice[0][chtext] to choice 1 [Other] Fail
Failed to set field choice[1][chtext] to choice 2 [Other] Fail
Found the requested form at [Other] Fail
Failed to set field choice[0][chtext] to choice 1 [Other] Fail
Failed to set field choice[1][chtext] to choice 2 [Other] Fail
Failed to set field choice[2][chtext] to choice 3 [Other] Fail
Failed to set field choice[3][chtext] to choice 4 [Other] Fail
Failed to set field choice[4][chtext] to choice 5 [Other] Fail
Failed to set field choice[5][chtext] to choice 6 [Other] Fail
Failed to set field choice[6][chtext] to choice 7 [Other] Fail
bar 0 found in preview at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 32] [Other] Fail
bar 1 found in preview at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 32] [Other] Fail
bar 2 found in preview at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 32] [Other] Fail
bar 3 found in preview at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 32] [Other] Fail
bar 4 found in preview at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 32] [Other] Fail
bar 5 found in preview at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 32] [Other] Fail
bar 6 found in preview at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 32] [Other] Fail
Found the requested form at [Other] Fail
Failed to set field choice[0][chtext] to choice 1 [Other] Fail
Failed to set field choice[1][chtext] to choice 2 [Other] Fail
Failed to set field choice[2][chtext] to choice 3 [Other] Fail
Failed to set field choice[3][chtext] to choice 4 [Other] Fail
Failed to set field choice[4][chtext] to choice 5 [Other] Fail
Failed to set field choice[5][chtext] to choice 6 [Other] Fail
Failed to set field choice[6][chtext] to choice 7 [Other] Fail
Poll has been created. at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 38] [Other] Fail
Poll has been found in the database at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 39] [Other] Fail
Unexpected PHP error [Trying to get property of non-object] severity [E_NOTICE] in [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 37] [PHP] Exception

Found the requested form at node/add/poll [Other] Fail
Failed to set field choice[0][chtext] to choice 1 [Other] Fail
Failed to set field choice[1][chtext] to choice 2 [Other] Fail
Found the requested form at [Other] Fail
ailed to set field choice[0][chtext] to choice 1 [Other] Fail
Failed to set field choice[1][chtext] to choice 2 [Other] Fail
Failed to set field choice[2][chtext] to choice 3 [Other] Fail
Failed to set field choice[3][chtext] to choice 4 [Other] Fail
Failed to set field choice[4][chtext] to choice 5 [Other] Fail
Failed to set field choice[5][chtext] to choice 6 [Other] Fail
Failed to set field choice[6][chtext] to choice 7 [Other] Fail
Poll has been created. at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 38] [Other] Fail
Poll has been found in the database at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 39] [Other] Fail
Found the requested form at node/ [Other] Fail
Found the Vote button [Other] Fail
Failed to set field choice to 1 [Other] Fail
Your vote was recorded. at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 87] [Other] Fail
ote table text. at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 89] [Other] Fail
vote recorded at [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 90] [Other] Fail
Unexpected PHP error [Trying to get property of non-object] severity [E_NOTICE] in [/Applications/MAMP/htdocs/head/modules/poll/poll.test line 37] [PHP] Exception

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Damien Tournoud’s picture

Most of these failures are bugs in the test.

Here is a first attempt at refactoring it.

Damien Tournoud’s picture

Status: Active » Needs review
FileSize
5.35 KB

Here is a second shot at refactoring poll tests, with a more generic way to create polls.

This covers only a tiny part of poll features. Untested features includes:

  • Vote counts
  • Protection against multiple votes
  • etc.
Damien Tournoud’s picture

The same patch, with a refactored test choices generation, and with the correction of a bug of the test with number of choices > 7.

catch’s picture

Status: Needs review » Reviewed & tested by the community

74 passes, 0 fails and 0 exceptions. Looks good to me. We can add more coverage in later patches.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

webchick’s picture

I think a similar fix to this might fix the DB Log tests. Damien, would you have a chance to take a look?

Anonymous’s picture

Status: Fixed » Closed (fixed)

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