You are here

public function FormSubmitterTest::testHandleFormSubmissionNotSubmitted in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php \Drupal\Tests\Core\Form\FormSubmitterTest::testHandleFormSubmissionNotSubmitted()

@covers ::doSubmitForm

File

core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php, line 52
Contains \Drupal\Tests\Core\Form\FormSubmitterTest.

Class

FormSubmitterTest
@coversDefaultClass \Drupal\Core\Form\FormSubmitter @group Form

Namespace

Drupal\Tests\Core\Form

Code

public function testHandleFormSubmissionNotSubmitted() {
  $form_submitter = $this
    ->getFormSubmitter();
  $form = array();
  $form_state = new FormState();
  $return = $form_submitter
    ->doSubmitForm($form, $form_state);
  $this
    ->assertFalse($form_state
    ->isExecuted());
  $this
    ->assertNull($return);
}