PHPCS fixes
This commit is contained in:
parent
189f346c2e
commit
4852db1e45
|
@ -1,4 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* Unit tests for Webhook functions.
|
||||
* @package WooCommerce\Tests\Webhook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class Functions.
|
||||
|
@ -44,6 +48,8 @@ class WC_Tests_Webhook_Functions extends WC_Unit_Test_Case {
|
|||
*
|
||||
* @dataProvider data_provider_test_wc_is_webhook_valid_topic
|
||||
* @since 3.2.0
|
||||
* @param bool $assert Expected value.
|
||||
* @param array $values Values to test.
|
||||
*/
|
||||
public function test_wc_is_webhook_valid_topic( $assert, $values ) {
|
||||
$this->assertEquals( $assert, $values );
|
||||
|
@ -97,8 +103,9 @@ class WC_Tests_Webhook_Functions extends WC_Unit_Test_Case {
|
|||
* @since 3.2.0
|
||||
*/
|
||||
public function test_wc_load_webhooks() {
|
||||
$webhook = new WC_Webhook;
|
||||
$webhook->set_props( array(
|
||||
$webhook = new WC_Webhook();
|
||||
$webhook->set_props(
|
||||
array(
|
||||
'status' => 'active',
|
||||
'name' => 'Testing webhook',
|
||||
'user_id' => 0,
|
||||
|
@ -106,7 +113,8 @@ class WC_Tests_Webhook_Functions extends WC_Unit_Test_Case {
|
|||
'secret' => 'secret',
|
||||
'topic' => 'action.woocommerce_some_action',
|
||||
'api_version' => 2,
|
||||
) );
|
||||
)
|
||||
);
|
||||
$webhook->save();
|
||||
|
||||
$this->assertTrue( wc_load_webhooks() );
|
||||
|
|
Loading…
Reference in New Issue