You are here

public function ProcessorAddFormTest::testCancelSubmit in Purge 8.3

Tests that the cancel button closes the dialog.

See also

\Drupal\purge_ui\Form\ProcessorAddForm::buildForm

\Drupal\purge_ui\Form\CloseDialogTrait::closeDialog

File

modules/purge_ui/tests/src/Functional/Form/ProcessorAddFormTest.php, line 114

Class

ProcessorAddFormTest
Tests \Drupal\purge_ui\Form\ProcessorAddForm.

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);
}