You are here

protected function CommentIntegrationTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php \Drupal\Tests\comment\Kernel\CommentIntegrationTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php, line 39

Class

CommentIntegrationTest
Tests integration of comment with other components.

Namespace

Drupal\Tests\comment\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('entity_test');
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('comment');
  $this
    ->installSchema('dblog', [
    'watchdog',
  ]);
  $this
    ->installSchema('system', [
    'sequences',
  ]);

  // Create a new 'comment' comment-type.
  CommentType::create([
    'id' => 'comment',
    'label' => $this
      ->randomString(),
    'target_entity_type_id' => 'entity_test',
  ])
    ->save();
}