public function MessageResourceTestBase::testPatch in Drupal 10
Same name and namespace in other branches
- 8 core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php \Drupal\Tests\contact\Functional\Rest\MessageResourceTestBase::testPatch()
- 9 core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php \Drupal\Tests\contact\Functional\Rest\MessageResourceTestBase::testPatch()
Tests a PATCH request for an entity, plus edge cases to ensure good DX.
Overrides EntityResourceTestBase::testPatch
File
- core/
modules/ contact/ tests/ src/ Functional/ Rest/ MessageResourceTestBase.php, line 125
Class
Namespace
Drupal\Tests\contact\Functional\RestCode
public function testPatch() {
// Contact Message entities are not stored, so they cannot be modified.
$this
->expectException(RouteNotFoundException::class);
$this
->expectExceptionMessage('Route "rest.entity.contact_message.PATCH" does not exist.');
$this
->provisionEntityResource();
Url::fromRoute('rest.entity.contact_message.PATCH')
->toString(TRUE);
}