You are here

public function ModalPageSettingsFormTest::getFormState in Modal 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/Kernel/Form/ModalPageSettingsFormTest.php \Drupal\Tests\modal_page\Kernel\Form\ModalPageSettingsFormTest::getFormState()

Get form values.

1 call to ModalPageSettingsFormTest::getFormState()
ModalPageSettingsFormTest::submitForm in tests/src/Kernel/Form/ModalPageSettingsFormTest.php
Test submit form.

File

tests/src/Kernel/Form/ModalPageSettingsFormTest.php, line 56

Class

ModalPageSettingsFormTest
Kernel tests for ModalPageSettingsForm.

Namespace

Drupal\Tests\modal_page\Kernel\Form

Code

public function getFormState() {

  // Emulate a form state of a submitted form.
  return (new FormState())
    ->setValues([
    'no_modal_page_external_js' => TRUE,
    'allowed_tags' => "h1,h2,a,b,big,code,del,em,i,ins,pre,q,small,span,strong,sub,sup,tt,ol,ul,li,p,br,img",
  ]);
}