You are here

protected function XBBCodeStandardTest::setUp in Extensible BBCode 8.3

Same name and namespace in other branches
  1. 4.0.x 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 34

Class

XBBCodeStandardTest
Class XBBCodeStandardTest.

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();
}