From f7a5658aae5a9bb592f0b2329c2f51e14d71e65a Mon Sep 17 00:00:00 2001 From: George Keremidchiev Date: Wed, 9 Dec 2020 11:27:12 +0200 Subject: [PATCH] Change Kohana_Exception hints --- tests/tests/Model/PromotionTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/tests/Model/PromotionTest.php b/tests/tests/Model/PromotionTest.php index 33a4b0c..0b33124 100644 --- a/tests/tests/Model/PromotionTest.php +++ b/tests/tests/Model/PromotionTest.php @@ -25,11 +25,12 @@ public function test_currency() /** * @covers Model_Promotion::price_for_purchase_item - * @expectedException Kohana_Exception - * @expectedExceptionMessage Not a valid promotion */ public function test_price_for_purchase_item() { + $this->expectException(Kohana_Exception::class); + $this->expectExceptionMessage('Not a valid promotion'); + $promotion = Jam::build('promotion'); $promotion->price_for_purchase_item(Jam::build('purchase_item_promotion')); @@ -37,11 +38,12 @@ public function test_price_for_purchase_item() /** * @covers Model_Promotion::price_for_purchase_item - * @expectedException Kohana_Exception - * @expectedExceptionMessage Not a valid promotion */ public function test_applies_to() { + $this->expectException(Kohana_Exception::class); + $this->expectExceptionMessage('Not a valid promotion'); + $promotion = Jam::build('promotion'); $promotion->applies_to(Jam::build('brand_purchase'));