function CommentUninstallTest::setUp
Overrides KernelTestBase::setUp
File
- 
              core/
modules/ comment/ tests/ src/ Kernel/ CommentUninstallTest.php, line 37  
Class
- CommentUninstallTest
 - Tests comment module uninstall.
 
Namespace
Drupal\Tests\comment\KernelCode
protected function setUp() : void {
  parent::setUp();
  $this->installEntitySchema('comment');
  $this->installConfig([
    'comment',
  ]);
  $this->installSchema('user', [
    'users_data',
  ]);
  NodeType::create([
    'type' => 'article',
    'name' => 'Article',
  ])->save();
  // Create comment field on article so that it adds 'comment_body' field.
  FieldStorageConfig::create([
    'type' => 'text_long',
    'entity_type' => 'comment',
    'field_name' => 'comment',
  ])->save();
  $this->addDefaultCommentField('node', 'article');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.