You are here

public function PurgerAddFormTest::testCancelSubmit in Purge 8.3

Tests that the cancel button closes the dialog.

See also

\Drupal\purge_ui\Form\PurgerAddForm::buildForm

\Drupal\purge_ui\Form\CloseDialogTrait::closeDialog

File

modules/purge_ui/tests/src/Functional/Form/PurgerAddFormTest.php, line 106

Class

PurgerAddFormTest
Tests \Drupal\purge_ui\Form\PurgerAddForm.

Namespace

Drupal\Tests\purge_ui\Functional\Form

Code

public function testCancelSubmit() : void {
  $this
    ->drupalLogin($this->adminUser);
  $ajax = $this
    ->postAjaxForm([], 'Cancel');
  $this
    ->assertAjaxCommandCloseModalDialog($ajax);
  $this
    ->assertAjaxCommandsTotal($ajax, 1);
}