PHPCS fixes

This commit is contained in:
Gerhard 2018-12-12 10:38:43 +02:00
parent 189f346c2e
commit 4852db1e45
1 changed files with 18 additions and 10 deletions

View File

@ -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,16 +103,18 @@ 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(
'status' => 'active',
'name' => 'Testing webhook',
'user_id' => 0,
'delivery_url' => 'https://requestb.in/17jajv31',
'secret' => 'secret',
'topic' => 'action.woocommerce_some_action',
'api_version' => 2,
) );
$webhook = new WC_Webhook();
$webhook->set_props(
array(
'status' => 'active',
'name' => 'Testing webhook',
'user_id' => 0,
'delivery_url' => 'https://requestb.in/17jajv31',
'secret' => 'secret',
'topic' => 'action.woocommerce_some_action',
'api_version' => 2,
)
);
$webhook->save();
$this->assertTrue( wc_load_webhooks() );