function CommentStringIdEntitiesTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php \Drupal\Tests\comment\Kernel\CommentStringIdEntitiesTest::setUp()
  2. 8.9.x core/modules/comment/tests/src/Kernel/CommentStringIdEntitiesTest.php \Drupal\Tests\comment\Kernel\CommentStringIdEntitiesTest::setUp()
  3. 11.x 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 33

Class

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

Namespace

Drupal\Tests\comment\Kernel

Code

protected function setUp() : void {
  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',
  ]);
}

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