Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
simpletest.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
7 May 2008 at 21:40 UTC
Updated:
7 Mar 2009 at 18:12 UTC
Jump to comment: Most recent
If you've got a form with a multiple select box, and want to test what happens when nothing is selected, drupalPost can't handle it, because the code assumed that at least one thing had been selected. This patch fixes that by checking for an empty selection.
This bug was discovered when writing tests for http://drupal.org/node/255942, and is necessary for it's tests to run.
| Comment | File | Size | Author |
|---|---|---|---|
| simpletest-fix-select-no-selection.patch | 1.72 KB | jcfiala |
Comments
Comment #1
boombatower commentedThis patch makes sense and two of the tests that use selects still pass so it doesn't appear break select functionality.
I haven't tested in the specific case that jcfiala is trying to fix, but the code is fairly simple and would appear to work.
Comment #2
dries commentedShould we include a test for this in core?
Comment #3
boombatower commentedIsn't jcfiala witting a test for block stuff (http://drupal.org/node/255942) that would be included in core?
Comment #4
jcfiala commentedI did, but it won't be included, apparently, as no one else sees a use for it. I don't know of any other core instances where I could set up a test to test this fix to the test framework.
Comment #5
alexanderpas commented@Dries :D
we should, as a user might for example, select no taxanomies in a required taxanomy multiselect-list, and we need to check if the error is properly displayed, thus requiering this functionality, thus requiering a test as it is D7 code ;).