You are here

public function MessageTest::testDeleteIndividual in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/tests/src/Functional/MessageTest.php \Drupal\Tests\jsonapi\Functional\MessageTest::testDeleteIndividual()
  2. 9 core/modules/jsonapi/tests/src/Functional/MessageTest.php \Drupal\Tests\jsonapi\Functional\MessageTest::testDeleteIndividual()

File

core/modules/jsonapi/tests/src/Functional/MessageTest.php, line 143

Class

MessageTest
JSON:API integration test for the "Message" content entity type.

Namespace

Drupal\Tests\jsonapi\Functional

Code

public function testDeleteIndividual() {

  // Contact Message entities are not stored, so they cannot be deleted.
  $this
    ->expectException(RouteNotFoundException::class);
  $this
    ->expectExceptionMessage('Route "jsonapi.contact_message--camelids.individual" does not exist.');
  Url::fromRoute('jsonapi.contact_message--camelids.individual')
    ->toString(TRUE);
}