function NormalizeTest::setUp

Same name in other branches
  1. 9 core/modules/hal/tests/src/Kernel/NormalizeTest.php \Drupal\Tests\hal\Kernel\NormalizeTest::setUp()

Overrides NormalizerTestBase::setUp

File

core/modules/hal/tests/src/Kernel/NormalizeTest.php, line 20

Class

NormalizeTest
Tests HAL normalization edge cases for EntityResource.

Namespace

Drupal\Tests\hal\Kernel

Code

protected function setUp() {
    parent::setUp();
    FilterFormat::create([
        'format' => 'my_text_format',
        'name' => 'My Text Format',
        'filters' => [
            'filter_html' => [
                'module' => 'filter',
                'status' => TRUE,
                'weight' => 10,
                'settings' => [
                    'allowed_html' => '<p>',
                ],
            ],
            'filter_autop' => [
                'module' => 'filter',
                'status' => TRUE,
                'weight' => 10,
                'settings' => [],
            ],
        ],
    ])->save();
    \Drupal::service('router.builder')->rebuild();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.