diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-30 22:52:24 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-30 22:52:24 +0000 |
commit | 75a7c31c337127dea4c64d77508d921a7a52889f (patch) | |
tree | d8a3d0343e31014922a8472b58ea35707863ed6f /modules/simpletest | |
parent | 540ce2b461ee6cef5ff0c7b6dd9d768b1338c229 (diff) | |
download | brdo-75a7c31c337127dea4c64d77508d921a7a52889f.tar.gz brdo-75a7c31c337127dea4c64d77508d921a7a52889f.tar.bz2 |
#971120 by bec, dereine, bojanz, chx: Fixed Radio button values get run through check_plain() twice
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/tests/form.test | 4 | ||||
-rw-r--r-- | modules/simpletest/tests/form_test.module | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test index b2b822361..a73ac16c2 100644 --- a/modules/simpletest/tests/form.test +++ b/modules/simpletest/tests/form.test @@ -396,7 +396,7 @@ class FormElementTestCase extends DrupalWebTestCase { // Verify that all options appear in their defined order. foreach (array('checkbox', 'radio') as $type) { $elements = $this->xpath('//input[@type=:type]', array(':type' => $type)); - $expected_values = array('0', 'foo', '1', 'bar'); + $expected_values = array('0', 'foo', '1', 'bar', '>'); foreach ($elements as $element) { $expected = array_shift($expected_values); $this->assertIdentical((string) $element['value'], $expected); @@ -410,7 +410,7 @@ class FormElementTestCase extends DrupalWebTestCase { // #weight into account. foreach (array('checkbox', 'radio') as $type) { $elements = $this->xpath('//input[@type=:type]', array(':type' => $type)); - $expected_values = array('0', 'foo', 'bar', '1'); + $expected_values = array('0', 'foo', 'bar', '>', '1'); foreach ($elements as $element) { $expected = array_shift($expected_values); $this->assertIdentical((string) $element['value'], $expected); diff --git a/modules/simpletest/tests/form_test.module b/modules/simpletest/tests/form_test.module index fadd2aa9a..f908c212f 100644 --- a/modules/simpletest/tests/form_test.module +++ b/modules/simpletest/tests/form_test.module @@ -355,7 +355,7 @@ function form_test_limit_validation_errors_form($form, &$form_state) { '#type' => 'textfield', '#element_validate' => array('form_test_limit_validation_errors_element_validate_test'), ); - + $form['test_substring'] = array( '#tree' => TRUE, ); @@ -369,7 +369,7 @@ function form_test_limit_validation_errors_form($form, &$form_state) { '#type' => 'textfield', '#element_validate' => array('form_test_limit_validation_errors_element_validate_test'), ); - + $form['actions']['partial'] = array( '#type' => 'submit', '#limit_validation_errors' => array(array('test')), @@ -997,6 +997,7 @@ function form_test_checkboxes_radios($form, &$form_state, $customize = FALSE) { 'foo' => 'Foo', 1 => 'One', 'bar' => 'Bar', + '>' => 'Special Char', ), ); if ($customize) { @@ -1020,6 +1021,7 @@ function form_test_checkboxes_radios($form, &$form_state, $customize = FALSE) { 'foo' => 'Foo', 1 => 'One', 'bar' => 'Bar', + '>' => 'Special Char', ), ); if ($customize) { |