From 853ce5d091c035bd93b3463532b700b9eaaa8c0f Mon Sep 17 00:00:00 2001 From: creme332 <65414576+creme332@users.noreply.github.com> Date: Tue, 9 Jul 2024 17:55:40 +0400 Subject: [PATCH] update based on new enums --- tests/helpers/TestHelper.php | 4 +++- tests/models/OrderProductTest.php | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/helpers/TestHelper.php b/tests/helpers/TestHelper.php index 661c177..1922664 100644 --- a/tests/helpers/TestHelper.php +++ b/tests/helpers/TestHelper.php @@ -10,6 +10,8 @@ use Steamy\Model\Client; use Steamy\Model\Location; use Steamy\Model\Order; +use Steamy\Model\OrderCupSize; +use Steamy\Model\OrderMilkType; use Steamy\Model\OrderProduct; use Steamy\Model\Product; use Faker\Generator; @@ -244,7 +246,7 @@ public static function createReview( $store->addProductStock($product->getProductID(), 10); $order = new Order($store->getStoreID(), $client->getUserID(), [ - new OrderProduct($product->getProductID(), 'small', 'oat', 1) + new OrderProduct($product->getProductID(), OrderCupSize::LARGE, OrderMilkType::ALMOND, 1) ]); $success = $order->save(); diff --git a/tests/models/OrderProductTest.php b/tests/models/OrderProductTest.php index e571c62..d2461a1 100644 --- a/tests/models/OrderProductTest.php +++ b/tests/models/OrderProductTest.php @@ -114,8 +114,6 @@ public function testValidate(): void $errors = $invalidOrderProduct->validate(); $this->assertArrayHasKey('quantity', $errors); - $this->assertArrayHasKey('cup_size', $errors); - $this->assertArrayHasKey('milk_type', $errors); $this->assertArrayHasKey('unit_price', $errors); }