public function PluginConfigFormTestBase::testCancelSubmit in Purge 8.3
Tests cancel button form submit.
File
- modules/
purge_ui/ tests/ src/ Functional/ Form/ Config/ PluginConfigFormTestBase.php, line 122
Class
- PluginConfigFormTestBase
- Testbase for purge_ui configuration forms (for plugins).
Namespace
Drupal\Tests\purge_ui\Functional\Form\ConfigCode
public function testCancelSubmit() : void {
$this
->drupalLogin($this->adminUser);
if ($this->dialogRouteTest) {
$ajax = $this
->postAjaxForm([], 'Cancel');
$this
->assertAjaxCommandCloseModalDialog($ajax);
$this
->assertAjaxCommandsTotal($ajax, 1);
}
else {
$this
->assertFalse(FALSE, "Don't mark this test as risky!");
}
}