You are here

protected function CommentTest::setUp in Token 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/CommentTest.php, line 30

Class

CommentTest
Tests comment tokens.

Namespace

Drupal\Tests\token\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('comment');
  $this
    ->installSchema('comment', [
    'comment_entity_statistics',
  ]);
  $node_type = NodeType::create([
    'type' => 'page',
    'name' => 'Page',
  ]);
  $node_type
    ->save();
  $this
    ->installConfig([
    'comment',
  ]);
  $this
    ->addDefaultCommentField('node', 'page');
}