PurgerConfigDialogFormTest.php in Purge 8.3
File
modules/purge_ui/tests/src/Functional/Form/PurgerConfigDialogFormTest.php
View source
<?php
namespace Drupal\Tests\purge_ui\Functional\Form;
use Drupal\purge_purger_test\Form\PurgerConfigForm;
use Drupal\Tests\purge_ui\Functional\Form\Config\PurgerConfigFormTestBase;
class PurgerConfigDialogFormTest extends PurgerConfigFormTestBase {
public static $modules = [
'purge_purger_test',
'purge_ui',
];
protected $dialogRouteTest = TRUE;
protected $pluginId = 'withform';
protected $formClass = PurgerConfigForm::class;
protected $formId = 'purge_purger_test.purgerconfigform';
public function setUp($switch_to_memory_queue = TRUE) : void {
parent::setUp($switch_to_memory_queue);
$this->formArgs[0]['dialog'] = TRUE;
}
public function testSaveConfigurationSubmit() : void {
$this
->drupalLogin($this->adminUser);
$this
->drupalGet($this
->getPath());
$this
->assertSession()
->fieldExists('textfield');
}
}