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); }