public function CommentTest::testPatchIndividual in Drupal 9
Same name and namespace in other branches
- 8 core/modules/jsonapi/tests/src/Functional/CommentTest.php \Drupal\Tests\jsonapi\Functional\CommentTest::testPatchIndividual()
Tests PATCHing an individual resource, plus edge cases to ensure good DX.
Overrides ResourceTestBase::testPatchIndividual
File
- core/
modules/ jsonapi/ tests/ src/ Functional/ CommentTest.php, line 464
Class
- CommentTest
- JSON:API integration test for the "Comment" content entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
public function testPatchIndividual() {
// Ensure ::getModifiedEntityForPatchTesting() can pick an alternative value
// for the 'entity_id' field.
EntityTest::create([
'name' => $this
->randomString(),
'type' => 'bar',
])
->save();
return parent::testPatchIndividual();
}