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
This commit is contained in:
Rodrigo Primo 2017-12-13 12:20:18 -02:00
parent ddc2d926fc
commit 2329e4f526
1 changed files with 1 additions and 1 deletions

View File

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