function MessageResourceTestBase::testPatch

Same name in other branches
  1. 9 core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php \Drupal\Tests\contact\Functional\Rest\MessageResourceTestBase::testPatch()
  2. 8.9.x core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php \Drupal\Tests\contact\Functional\Rest\MessageResourceTestBase::testPatch()
  3. 11.x core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php \Drupal\Tests\contact\Functional\Rest\MessageResourceTestBase::testPatch()

Overrides EntityResourceTestBase::testPatch

File

core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php, line 127

Class

MessageResourceTestBase

Namespace

Drupal\Tests\contact\Functional\Rest

Code

public function testPatch() : void {
    // 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);
}

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