public function EntityResourceTest::deleteRelationshipProvider in JSON:API 8
Provides data for the testDeleteRelationship.
Return value
array The input data for the test function.
File
- tests/
src/ Kernel/ Controller/ EntityResourceTest.php, line 859
Class
- EntityResourceTest
- @coversDefaultClass \Drupal\jsonapi\Controller\EntityResource @group jsonapi @group legacy
Namespace
Drupal\Tests\jsonapi\Kernel\ControllerCode
public function deleteRelationshipProvider() {
return [
// Remove one relationship.
[
[
[
'target_id' => 1,
],
],
[
[
'target_id' => 2,
],
],
],
// Remove all relationships.
[
[
[
'target_id' => 2,
],
[
'target_id' => 1,
],
],
[],
],
// Remove no relationship.
[
[],
[
[
'target_id' => 1,
],
[
'target_id' => 2,
],
],
],
];
}