Improve test_wc_load_webhooks() checking when returns false
This commit is contained in:
parent
8c120da100
commit
e31da15959
|
@ -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' );
|
||||
|
|
|
@ -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() );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue