From 9320b250273756d7cc7b2d06c3c4c57775e66822 Mon Sep 17 00:00:00 2001 From: sctn4elk Date: Sat, 1 Jun 2024 10:27:11 -0500 Subject: [PATCH] Clean up code, add test condition --- Controller/API/ImageController.php | 2 +- Tests/Controller/API/CustomerControllerTest.php | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Controller/API/ImageController.php b/Controller/API/ImageController.php index fa3d0ca..b44eea9 100644 --- a/Controller/API/ImageController.php +++ b/Controller/API/ImageController.php @@ -224,7 +224,7 @@ class ImageController extends BaseController { return $this->unprocessableRequestResponse("Request type is not GET"); } - return $this->unprocessableRequestResponse("updateImage is not implemented"); + return $this->unprocessableRequestResponse("blobImage is not implemented"); } private function validateImage(){ diff --git a/Tests/Controller/API/CustomerControllerTest.php b/Tests/Controller/API/CustomerControllerTest.php index 66ff35e..da6e09f 100644 --- a/Tests/Controller/API/CustomerControllerTest.php +++ b/Tests/Controller/API/CustomerControllerTest.php @@ -35,6 +35,13 @@ class CustomerControllerTest extends TestCase { $this->control = null; } + public function testConnection(): void + { + $response = $this->httpClient->request('GET', 'http://localhost/CustomerRewards/index.php'); + $statusCode = $response->getStatusCode(); + $this->assertSame(404, $statusCode); + } + public function testConstruct(): void { $this->assertSame('CustomerController', $this->control->basename);