diff --git a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Form/FormTestForm.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Form/FormTestForm.php index 7b13932..005738c 100644 --- a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Form/FormTestForm.php +++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Form/FormTestForm.php @@ -67,60 +67,6 @@ public function validatePattern() { } /** - * Wraps _form_test_tableselect_multiple_true_form(). - * - * @todo Remove _form_test_tableselect_multiple_true_form(). - */ - public function testTableSelectCheckboxes() { - return drupal_get_form('_form_test_tableselect_multiple_true_form'); - } - - /** - * Wraps _form_test_tableselect_multiple_false_form(). - * - * @todo Remove _form_test_tableselect_multiple_false_form(). - */ - public function testTableSelectRadios() { - return drupal_get_form('_form_test_tableselect_multiple_false_form'); - } - - /** - * Wraps _form_test_tableselect_colspan_form(). - * - * @todo Remove _form_test_tableselect_colspan_form(). - */ - public function testTableSelectColspan() { - return drupal_get_form('_form_test_tableselect_colspan_form'); - } - - /** - * Wraps _form_test_tableselect_empty_form(). - * - * @todo Remove _form_test_tableselect_empty_form(). - */ - public function testTableSelectEmptyText() { - return drupal_get_form('_form_test_tableselect_empty_form'); - } - - /** - * Wraps _form_test_tableselect_js_select_form(). - * - * @todo Remove _form_test_tableselect_js_select_form(). - */ - public function testTableSelectJS($test_action) { - return drupal_get_form('_form_test_tableselect_js_select_form', $test_action); - } - - /** - * Wraps _form_test_vertical_tabs_form(). - * - * @todo Remove _form_test_vertical_tabs_form(). - */ - public function testVerticalTabs() { - return drupal_get_form('_form_test_vertical_tabs_form'); - } - - /** * Wraps form_test_storage_form(). * * @todo Remove form_test_storage_form(). @@ -148,15 +94,6 @@ public function testFormStateCleanAdvanced() { } /** - * Wraps _form_test_checkbox(). - * - * @todo Remove _form_test_checkbox(). - */ - public function testCheckbox() { - return drupal_get_form('_form_test_checkbox'); - } - - /** * Wraps form_test_select(). * * @todo Remove form_test_select(). @@ -273,16 +210,6 @@ public function testDisabledElements() { return drupal_get_form('_form_test_disabled_elements'); } - /** - * Wraps _form_test_input_forgery(). - * - * @todo Remove _form_test_input_forgery(). - */ - public function testInputForgery() { - return drupal_get_form('_form_test_input_forgery'); - } - - /** * Wraps form_test_form_rebuild_preserve_values_form(). * * @todo Remove form_test_form_rebuild_preserve_values_form(). diff --git a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestCheckboxForm.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestCheckboxForm.php index 1caa231..43acba9 100644 --- a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestCheckboxForm.php +++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestCheckboxForm.php @@ -8,6 +8,7 @@ namespace Drupal\form_test; use Drupal\Core\Form\FormBase; +use Symfony\Component\HttpFoundation\JsonResponse; class FormTestCheckboxForm extends FormBase { /** @@ -21,8 +22,6 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $form['#submit'] = array('_form_test_submit_values_json'); - // A required checkbox. $form['required_checkbox'] = array( '#type' => 'checkbox', @@ -91,5 +90,9 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { + $response = new JsonResponse($form_state['values']); + // @todo remove once converted to new routing system. + $response->send(); + exit; } } diff --git a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestInputForgeryForm.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestInputForgeryForm.php index 43ab396..601128e 100644 --- a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestInputForgeryForm.php +++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestInputForgeryForm.php @@ -8,6 +8,7 @@ namespace Drupal\form_test; use Drupal\Core\Form\FormBase; +use Symfony\Component\HttpFoundation\JsonResponse; class FormTestInputForgeryForm extends FormBase { /** @@ -21,8 +22,6 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $form['#submit'] = array('_form_test_submit_values_json'); - // For testing that a user can't submit a value not matching one of the // allowed options. $form['checkboxes'] = array( @@ -45,5 +44,6 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { + return new JsonResponse($form_state['values']); } } diff --git a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestTableSelectJsSelectForm.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestTableSelectJsSelectForm.php index cc0292f..ce907d0 100644 --- a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestTableSelectJsSelectForm.php +++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestTableSelectJsSelectForm.php @@ -22,7 +22,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state, $test_action = NULL) { - switch (String::checkPlain($test_action)) { + switch ($test_action) { case 'multiple-true-default': $options = array('#multiple' => TRUE); break; @@ -40,7 +40,7 @@ public function buildForm(array $form, array &$form_state, $test_action = NULL) break; } - return _form_test_tableselect_form_builder($form, $form_state, $options);; + return _form_test_tableselect_form_builder($form, $form_state, $options); } /**