protected function CommentResourceTestBase::getNormalizedPostEntity in Drupal 10
Same name and namespace in other branches
- 8 core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php \Drupal\Tests\comment\Functional\Rest\CommentResourceTestBase::getNormalizedPostEntity()
- 9 core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php \Drupal\Tests\comment\Functional\Rest\CommentResourceTestBase::getNormalizedPostEntity()
3 calls to CommentResourceTestBase::getNormalizedPostEntity()
- CommentResourceTestBase::getNormalizedPatchEntity in core/
modules/ comment/ tests/ src/ Functional/ Rest/ CommentResourceTestBase.php - CommentResourceTestBase::testPostDxWithoutCriticalBaseFields in core/
modules/ comment/ tests/ src/ Functional/ Rest/ CommentResourceTestBase.php - Tests POSTing a comment without critical base fields.
- CommentResourceTestBase::testPostSkipCommentApproval in core/
modules/ comment/ tests/ src/ Functional/ Rest/ CommentResourceTestBase.php - Tests POSTing a comment with and without 'skip comment approval'.
File
- core/
modules/ comment/ tests/ src/ Functional/ Rest/ CommentResourceTestBase.php, line 218
Class
Namespace
Drupal\Tests\comment\Functional\RestCode
protected function getNormalizedPostEntity() {
return [
'comment_type' => [
[
'target_id' => 'comment',
],
],
'entity_type' => [
[
'value' => 'entity_test',
],
],
'entity_id' => [
[
'target_id' => (int) EntityTest::load(1)
->id(),
],
],
'field_name' => [
[
'value' => 'comment',
],
],
'subject' => [
[
'value' => 'Dramallama',
],
],
'comment_body' => [
[
'value' => 'Llamas are awesome.',
'format' => 'plain_text',
],
],
];
}