WebformExporterExcludedTest.php in Webform 8.5
File
tests/src/Functional/Exporter/WebformExporterExcludedTest.php
View source
<?php
namespace Drupal\Tests\webform\Functional\Exporter;
use Drupal\Tests\webform\Functional\WebformBrowserTestBase;
class WebformExporterExcludedTest extends WebformBrowserTestBase {
public function testExcludeExporters() {
$this
->drupalLogin($this->rootUser);
$this
->drupalGet('/admin/structure/webform/manage/contact/results/download');
$this
->assertRaw('<option value="delimited"');
$this
->assertRaw('<option value="table"');
$this
->assertRaw('<option value="json"');
$this
->assertRaw('<option value="yaml"');
\Drupal::configFactory()
->getEditable('webform.settings')
->set('export.excluded_exporters', [
'delimited' => 'delimited',
])
->save();
$this
->drupalGet('/admin/structure/webform/manage/contact/results/download');
$this
->assertNoRaw('<option value="delimited"');
$this
->assertRaw('<option value="table"');
$this
->assertRaw('<option value="json"');
$this
->assertRaw('<option value="yaml"');
}
}