public function FormSubmitterTest::testHandleFormSubmissionNoRedirect in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php \Drupal\Tests\Core\Form\FormSubmitterTest::testHandleFormSubmissionNoRedirect()
- 9 core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php \Drupal\Tests\Core\Form\FormSubmitterTest::testHandleFormSubmissionNoRedirect()
@covers ::doSubmitForm
File
- core/
tests/ Drupal/ Tests/ Core/ Form/ FormSubmitterTest.php, line 60
Class
- FormSubmitterTest
- @coversDefaultClass \Drupal\Core\Form\FormSubmitter @group Form
Namespace
Drupal\Tests\Core\FormCode
public function testHandleFormSubmissionNoRedirect() {
$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);
}