From 2329e4f5267fa29eb40298fa0a84a7e59b714fa8 Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Wed, 13 Dec 2017 12:20:18 -0200 Subject: [PATCH] Add exception message to fix failing test This commit adds the exception message thrown when WC_Order::set_billing_email() is called with an invalid message to a test to fix it. I couldn't find what change in WC codebase broke the test and I'm not sure why it is failing only when running using PHP 5.6: https://travis-ci.org/woocommerce/woocommerce/jobs/315750242#L600 --- tests/unit-tests/order/class-wc-tests-crud-orders.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit-tests/order/class-wc-tests-crud-orders.php b/tests/unit-tests/order/class-wc-tests-crud-orders.php index cf203b7068d..85c12198a3d 100644 --- a/tests/unit-tests/order/class-wc-tests-crud-orders.php +++ b/tests/unit-tests/order/class-wc-tests-crud-orders.php @@ -1024,7 +1024,7 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case { $this->assertEquals( $set_to, $object->get_billing_email() ); $set_to = 'not an email'; - $this->setExpectedException( 'WC_Data_Exception' ); + $this->setExpectedException( 'WC_Data_Exception', 'Invalid billing email address' ); $object->set_billing_email( $set_to ); $this->assertEquals( 'test@test.com', $object->get_billing_email() ); }