protected function CommentUninstallTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/comment/tests/src/Kernel/CommentUninstallTest.php \Drupal\Tests\comment\Kernel\CommentUninstallTest::setUp()
- 9 core/modules/comment/tests/src/Kernel/CommentUninstallTest.php \Drupal\Tests\comment\Kernel\CommentUninstallTest::setUp()
File
- core/
modules/ comment/ tests/ src/ Kernel/ CommentUninstallTest.php, line 35
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',
])
->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');
}