function CommentTest::testPatchIndividual

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/tests/src/Functional/CommentTest.php \Drupal\Tests\jsonapi\Functional\CommentTest::testPatchIndividual()
  2. 8.9.x core/modules/jsonapi/tests/src/Functional/CommentTest.php \Drupal\Tests\jsonapi\Functional\CommentTest::testPatchIndividual()
  3. 10 core/modules/jsonapi/tests/src/Functional/CommentTest.php \Drupal\Tests\jsonapi\Functional\CommentTest::testPatchIndividual()

Overrides ResourceTestBase::testPatchIndividual

File

core/modules/jsonapi/tests/src/Functional/CommentTest.php, line 471

Class

CommentTest
JSON:API integration test for the "Comment" content entity type.

Namespace

Drupal\Tests\jsonapi\Functional

Code

public function testPatchIndividual() : void {
    // Ensure ::getModifiedEntityForPatchTesting() can pick an alternative value
    // for the 'entity_id' field.
    EntityTest::create([
        'name' => $this->randomString(),
        'type' => 'bar',
    ])
        ->save();
    parent::testPatchIndividual();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.