Add tests.

This commit is contained in:
Brent Nef 2021-02-02 14:55:04 -08:00 committed by Jorge A. Torres
parent c01fcf389a
commit 40a1988f24
1 changed files with 4 additions and 0 deletions

View File

@ -172,6 +172,10 @@ class WC_Tests_Webhook_Functions extends WC_Unit_Test_Case {
$webhook_one = $this->create_webhook( 'action.woocommerce_one_test' ); $webhook_one = $this->create_webhook( 'action.woocommerce_one_test' );
$webhook_two = $this->create_webhook( 'action.woocommerce_two_test' ); $webhook_two = $this->create_webhook( 'action.woocommerce_two_test' );
$this->assertFalse( wc_load_webhooks( '', 0 ) );
$this->assertFalse( isset( $wp_filter['woocommerce_one_test'] ) );
$this->assertFalse( isset( $wp_filter['woocommerce_two_test'] ) );
$this->assertTrue( wc_load_webhooks( '', 1 ) ); $this->assertTrue( wc_load_webhooks( '', 1 ) );
$this->assertFalse( isset( $wp_filter['woocommerce_one_test'] ) ); $this->assertFalse( isset( $wp_filter['woocommerce_one_test'] ) );
$this->assertTrue( isset( $wp_filter['woocommerce_two_test'] ) ); $this->assertTrue( isset( $wp_filter['woocommerce_two_test'] ) );