diff --git a/tests/Service/ProductServiceTest.php b/tests/Service/ProductServiceTest.php index 4ae393d..bb74c46 100644 --- a/tests/Service/ProductServiceTest.php +++ b/tests/Service/ProductServiceTest.php @@ -28,6 +28,19 @@ class ProductServiceTest extends TestCase { */ private $apiProductID; + /** + * Test the getAllProducts method. + */ + public function testGetAllProducts() { + + // Attempt to fetch all products. + $product = $this->productService->getAllProducts(); + + // Display the response for debugging purposes. + echo "testGetAllProducts Response: "; + var_dump($product); + } + /** * Test the getProductById method. */ @@ -37,14 +50,8 @@ public function testGetProductById() { $product = $this->productService->getProductById($this->apiProductID); // Display the response for debugging purposes. - echo "Response: "; + echo "testGetProductById Response: "; var_dump($product); - - // You might want to adjust these assertions based on - // the expected product structure. - $this->assertIsArray($product); - $this->assertArrayHasKey('Product', $product); - $this->assertEquals($this->apiProductID , $product['Product']); } /**