Fix PHPCS errors

This commit is contained in:
Rodrigo Primo 2019-07-19 10:19:23 -03:00
parent 5eb11ea77a
commit 16442956e8
2 changed files with 17 additions and 9 deletions

View File

@ -1,15 +1,19 @@
<?php <?php
/**
* Tests for WC_Order_Refund.
*
* @package WooCommerce\Tests\CRUD
*/
/** /**
* Meta * Tests for WC_Order_Refund.
* @package WooCommerce\Tests\CRUD
*/ */
class WC_Tests_CRUD_Refunds extends WC_Unit_Test_Case { class WC_Tests_CRUD_Refunds extends WC_Unit_Test_Case {
/** /**
* Test: get_type * Test: get_type
*/ */
function test_get_type() { public function test_get_type() {
$object = new WC_Order_Refund(); $object = new WC_Order_Refund();
$this->assertEquals( 'shop_order_refund', $object->get_type() ); $this->assertEquals( 'shop_order_refund', $object->get_type() );
} }
@ -17,7 +21,7 @@ class WC_Tests_CRUD_Refunds extends WC_Unit_Test_Case {
/** /**
* Test: get_refund_amount * Test: get_refund_amount
*/ */
function test_get_refund_amount() { public function test_get_refund_amount() {
$object = new WC_Order_Refund(); $object = new WC_Order_Refund();
$object->set_amount( 20 ); $object->set_amount( 20 );
$this->assertEquals( '20', $object->get_amount() ); $this->assertEquals( '20', $object->get_amount() );
@ -26,7 +30,7 @@ class WC_Tests_CRUD_Refunds extends WC_Unit_Test_Case {
/** /**
* Test: get_refund_reason * Test: get_refund_reason
*/ */
function test_get_refund_reason() { public function test_get_refund_reason() {
$object = new WC_Order_Refund(); $object = new WC_Order_Refund();
$object->set_reason( 'Customer is an idiot' ); $object->set_reason( 'Customer is an idiot' );
$this->assertEquals( 'Customer is an idiot', $object->get_reason() ); $this->assertEquals( 'Customer is an idiot', $object->get_reason() );
@ -35,7 +39,7 @@ class WC_Tests_CRUD_Refunds extends WC_Unit_Test_Case {
/** /**
* Test: get_refunded_by * Test: get_refunded_by
*/ */
function test_get_refunded_by() { public function test_get_refunded_by() {
$object = new WC_Order_Refund(); $object = new WC_Order_Refund();
$object->set_refunded_by( 1 ); $object->set_refunded_by( 1 );
$this->assertEquals( 1, $object->get_refunded_by() ); $this->assertEquals( 1, $object->get_refunded_by() );
@ -44,7 +48,7 @@ class WC_Tests_CRUD_Refunds extends WC_Unit_Test_Case {
/** /**
* Test: get_refunded_payment * Test: get_refunded_payment
*/ */
function test_get_refunded_payment() { public function test_get_refunded_payment() {
$object = new WC_Order_Refund(); $object = new WC_Order_Refund();
$object->set_refunded_payment( true ); $object->set_refunded_payment( true );
$this->assertEquals( true, $object->get_refunded_payment() ); $this->assertEquals( true, $object->get_refunded_payment() );

View File

@ -1,8 +1,12 @@
<?php <?php
/**
* Order coupon tests.
*
* @package WooCommerce\Tests\Orders
*/
/** /**
* Order coupon tests. * Order coupon tests.
* @package WooCommerce\Tests\Orders
*/ */
class WC_Tests_Order_Coupons extends WC_Unit_Test_Case { class WC_Tests_Order_Coupons extends WC_Unit_Test_Case {
@ -48,7 +52,7 @@ class WC_Tests_Order_Coupons extends WC_Unit_Test_Case {
) )
); );
// Add order products // Add order products.
$product_item = new WC_Order_Item_Product(); $product_item = new WC_Order_Item_Product();
$coupon_item_1 = new WC_Order_Item_Coupon(); $coupon_item_1 = new WC_Order_Item_Coupon();
$coupon_item_2 = new WC_Order_Item_Coupon(); $coupon_item_2 = new WC_Order_Item_Coupon();