function FieldSelfTokensTest::setUp

Same name in other branches
  1. 11.x core/modules/views/tests/src/Kernel/Handler/FieldSelfTokensTest.php \Drupal\Tests\views\Kernel\Handler\FieldSelfTokensTest::setUp()

This method is called before each test.

Overrides ViewsKernelTestBase::setUp

File

core/modules/views/tests/src/Kernel/Handler/FieldSelfTokensTest.php, line 35

Class

FieldSelfTokensTest
Tests token escaping in the EntityField handler.

Namespace

Drupal\Tests\views\Kernel\Handler

Code

protected function setUp($import_test_views = TRUE) : void {
    parent::setUp();
    $this->installEntitySchema('user');
    $this->installEntitySchema('node');
    NodeType::create([
        'type' => 'article',
        'name' => 'Article',
    ])->save();
    Node::create([
        'title' => 'Questions & Answers',
        'type' => 'article',
    ])->save();
}

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