function FormSubmitterTest::testHandleFormSubmissionNoRedirect

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php \Drupal\Tests\Core\Form\FormSubmitterTest::testHandleFormSubmissionNoRedirect()
  2. 9 core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php \Drupal\Tests\Core\Form\FormSubmitterTest::testHandleFormSubmissionNoRedirect()
  3. 8.9.x core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php \Drupal\Tests\Core\Form\FormSubmitterTest::testHandleFormSubmissionNoRedirect()

Tests handle form submission no redirect.

@legacy-covers ::doSubmitForm

File

core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php, line 90

Class

FormSubmitterTest
Tests Drupal\Core\Form\FormSubmitter.

Namespace

Drupal\Tests\Core\Form

Code

public function testHandleFormSubmissionNoRedirect() : void {
  $form_submitter = $this->getFormSubmitter();
  $form = [];
  $form_state = (new FormState())->setSubmitted()
    ->disableRedirect();
  $return = $form_submitter->doSubmitForm($form, $form_state);
  $this->assertTrue($form_state->isExecuted());
  $this->assertNull($return);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.