diff --git a/core/modules/rest/src/Tests/DeleteTest.php b/core/modules/rest/src/Tests/DeleteTest.php index c001691..2d631cc 100644 --- a/core/modules/rest/src/Tests/DeleteTest.php +++ b/core/modules/rest/src/Tests/DeleteTest.php @@ -7,6 +7,7 @@ namespace Drupal\rest\Tests; +use Drupal\core\Url; use Drupal\rest\Tests\RESTTestBase; /** @@ -53,7 +54,7 @@ public function testDelete() { $this->assertEqual($response, '', 'Response body is empty.'); // Try to delete an entity that does not exist. - $response = $this->httpRequest($entity_type . '/9999', 'DELETE'); + $response = $this->httpRequest(Url::fromUri('base://' . $entity_type . '/9999'), 'DELETE'); $this->assertResponse(404); $this->assertText('The requested page could not be found.'); @@ -73,6 +74,6 @@ public function testDelete() { $this->httpRequest($account->urlInfo(), 'DELETE'); $user = entity_load('user', $account->id(), TRUE); $this->assertEqual($account->id(), $user->id(), 'User still exists in the database.'); - $this->assertResponse(404); + $this->assertResponse(405); } }