You are here

protected function CommentStringIdEntitiesTest::setUp in Drupal 8

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

Overrides KernelTestBase::setUp

File

core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php, line 30

Class

CommentStringIdEntitiesTest
Tests that comment fields cannot be added to entities with non-integer IDs.

Namespace

Drupal\Tests\comment\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('comment');
  $this
    ->installEntitySchema('entity_test_string_id');
  $this
    ->installSchema('comment', [
    'comment_entity_statistics',
  ]);

  // Create the comment body field storage.
  $this
    ->installConfig([
    'field',
  ]);
}