function CommentResourceTestBase::getNormalizedPostEntity
Same name in other branches
- 8.9.x core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php \Drupal\Tests\comment\Functional\Rest\CommentResourceTestBase::getNormalizedPostEntity()
- 10 core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php \Drupal\Tests\comment\Functional\Rest\CommentResourceTestBase::getNormalizedPostEntity()
- 11.x core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php \Drupal\Tests\comment\Functional\Rest\CommentResourceTestBase::getNormalizedPostEntity()
Overrides EntityResourceTestBase::getNormalizedPostEntity
4 calls to CommentResourceTestBase::getNormalizedPostEntity()
- CommentHalJsonTestBase::getNormalizedPostEntity in core/
modules/ hal/ tests/ src/ Functional/ comment/ CommentHalJsonTestBase.php - Returns the normalized POST entity.
- CommentResourceTestBase::getNormalizedPatchEntity in core/
modules/ comment/ tests/ src/ Functional/ Rest/ CommentResourceTestBase.php - Returns the normalized PATCH entity.
- 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'.
1 method overrides CommentResourceTestBase::getNormalizedPostEntity()
- CommentHalJsonTestBase::getNormalizedPostEntity in core/
modules/ hal/ tests/ src/ Functional/ comment/ CommentHalJsonTestBase.php - Returns the normalized POST entity.
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',
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.