public function MessageTest::testPatchIndividual in JSON:API 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/MessageTest.php \Drupal\Tests\jsonapi\Functional\MessageTest::testPatchIndividual()
Tests PATCHing an individual resource, plus edge cases to ensure good DX.
Overrides ResourceTestBase::testPatchIndividual
File
- tests/
src/ Functional/ MessageTest.php, line 126
Class
- MessageTest
- JSON API integration test for the "Message" content entity type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
public function testPatchIndividual() {
// Contact Message entities are not stored, so they cannot be modified.
$this
->setExpectedException(RouteNotFoundException::class, 'Route "jsonapi.contact_message--camelids.individual" does not exist.');
Url::fromRoute('jsonapi.contact_message--camelids.individual')
->toString(TRUE);
}