Improve test_wc_load_webhooks() checking when returns false

This commit is contained in:
Claudio Sanches 2017-08-17 12:32:30 -03:00
parent 8c120da100
commit e31da15959
2 changed files with 5 additions and 3 deletions

View File

@ -61,7 +61,8 @@ function wc_get_webhook_statuses() {
/**
* Load webhooks.
*
* @since 3.2.0
* @since 3.2.0
* @return bool
*/
function wc_load_webhooks() {
$data_store = WC_Data_Store::load( 'webhook' );

View File

@ -81,8 +81,9 @@ class WC_Tests_Webhook_Functions extends WC_Unit_Test_Case {
) );
$webhook->save();
$results = wc_load_webhooks();
$this->assertTrue( wc_load_webhooks() );
$this->assertTrue( $results );
$webhook->delete( true );
$this->assertFalse( wc_load_webhooks() );
}
}