From 68f5b9e231f325cf53e8d92793bdeed689dfd75e Mon Sep 17 00:00:00 2001 From: Shamimul Alam Date: Fri, 10 Mar 2023 04:16:36 +0600 Subject: [PATCH] [9.x] Add assertUnsupportedMediaType method for assertion Unsupported Media Type --- src/Illuminate/Testing/Concerns/AssertsStatusCodes.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Illuminate/Testing/Concerns/AssertsStatusCodes.php b/src/Illuminate/Testing/Concerns/AssertsStatusCodes.php index 9622620b0212..30a0c5ed4ecd 100644 --- a/src/Illuminate/Testing/Concerns/AssertsStatusCodes.php +++ b/src/Illuminate/Testing/Concerns/AssertsStatusCodes.php @@ -143,6 +143,16 @@ public function assertConflict() return $this->assertStatus(409); } + /** + * Assert that the response has a 415 "Unsupported Media Type" status code. + * + * @return $this + */ + public function assertUnsupportedMediaType() + { + return $this->assertStatus(415); + } + /** * Assert that the response has a 422 "Unprocessable Entity" status code. *