You are here

protected function XBBCodeStandardTest::setUp in Extensible BBCode 4.0.x

Same name and namespace in other branches
  1. 8.3 standard/tests/src/Kernel/XBBCodeStandardTest.php \Drupal\Tests\xbbcode_standard\Kernel\XBBCodeStandardTest::setUp()

Throws

\Drupal\Core\Entity\EntityStorageException

Overrides KernelTestBase::setUp

File

standard/tests/src/Kernel/XBBCodeStandardTest.php, line 32

Class

XBBCodeStandardTest
Test the standard tags provided by XBBCode.

Namespace

Drupal\Tests\xbbcode_standard\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installConfig([
    'xbbcode',
    'xbbcode_standard',
  ]);

  // Set up a BBCode filter format.
  $format = [
    'format' => 'xbbcode_test',
    'name' => 'XBBCode Test',
    'filters' => [
      'filter_html_escape' => [
        'status' => 1,
        'weight' => 0,
      ],
      'xbbcode' => [
        'status' => 1,
        'weight' => 1,
        'settings' => [
          'linebreaks' => FALSE,
        ],
      ],
    ],
  ];
  FilterFormat::create($format)
    ->save();
}