function CommentTypeValidationTest::setUp

Overrides ConfigEntityValidationTestBase::setUp

File

core/modules/comment/tests/src/Kernel/CommentTypeValidationTest.php, line 25

Class

CommentTypeValidationTest
Tests validation of comment_type entities.

Namespace

Drupal\Tests\comment\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this->entity = CommentType::create([
    'id' => 'test',
    'label' => 'Test',
    'target_entity_type_id' => 'node',
  ]);
  $this->entity
    ->save();
}

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