Unit Tests: Added assertIsWPError to WC unit test framework
This commit is contained in:
parent
6960138876
commit
e5d418305d
|
@ -71,6 +71,16 @@ class WC_Unit_Test_Case extends WP_UnitTestCase {
|
|||
$this->assertNotInstanceOf( 'WP_Error', $actual, $message );
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts thing is WP_Error
|
||||
*
|
||||
* @param $actual
|
||||
* @param string $message
|
||||
*/
|
||||
public function assertIsWPError( $actual, $message = '' ) {
|
||||
$this->assertInstanceOf( 'WP_Error', $actual, $message );
|
||||
}
|
||||
|
||||
/**
|
||||
* Backport assertNotFalse to PHPUnit 3.6.12 which only runs in PHP 5.2
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue