You are here

public function EntityResourceTest::patchRelationshipProvider in JSON:API 8

Provides data for the testPatchRelationship.

Return value

array The input data for the test function.

File

tests/src/Kernel/Controller/EntityResourceTest.php, line 735

Class

EntityResourceTest
@coversDefaultClass \Drupal\jsonapi\Controller\EntityResource @group jsonapi @group legacy

Namespace

Drupal\Tests\jsonapi\Kernel\Controller

Code

public function patchRelationshipProvider() {
  return [
    // Replace relationships.
    [
      [
        [
          'target_id' => 2,
        ],
        [
          'target_id' => 1,
        ],
      ],
    ],
    // Remove relationships.
    [
      [],
    ],
  ];
}