protected function WebformBrowserTestTrait::createFilters in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Traits/WebformBrowserTestTrait.php \Drupal\Tests\webform\Traits\WebformBrowserTestTrait::createFilters()
Create basic HTML filter format.
11 calls to WebformBrowserTestTrait::createFilters()
- WebformEditorTest::setUp in tests/
src/ Functional/ WebformEditorTest.php - WebformElementComputedTest::setUp in tests/
src/ Functional/ Element/ WebformElementComputedTest.php - WebformElementHtmlEditorTest::setUp in tests/
src/ Functional/ Element/ WebformElementHtmlEditorTest.php - WebformElementTextFormatTest::testTextFormatFiles in tests/
src/ Functional/ Element/ WebformElementTextFormatTest.php - Tests webform text format element files.
- WebformEntityTranslationTest::setUp in tests/
src/ Functional/ WebformEntityTranslationTest.php
File
- tests/
src/ Traits/ WebformBrowserTestTrait.php, line 74
Class
- WebformBrowserTestTrait
- Provides convenience methods for webform assertions in browser tests.
Namespace
Drupal\Tests\webform\TraitsCode
protected function createFilters() {
$this->basicHtmlFilter = FilterFormat::create([
'format' => 'basic_html',
'name' => 'Basic HTML',
'filters' => [
'filter_html' => [
'status' => 1,
'settings' => [
'allowed_html' => '<p> <br> <strong> <a> <em>',
],
],
],
]);
$this->basicHtmlFilter
->save();
$this->fullHtmlFilter = FilterFormat::create([
'format' => 'full_html',
'name' => 'Full HTML',
]);
$this->fullHtmlFilter
->save();
}