Fixed coding standards

This commit is contained in:
Claudio Sanches 2017-03-21 12:38:35 -03:00
parent fa472689d6
commit f1dab3fdce
4 changed files with 14 additions and 8 deletions

View File

@ -384,17 +384,23 @@ class WC_Tests_CRUD_Data extends WC_Unit_Test_Case {
*/
function test_set_date_prop_server_timezone() {
// Repeat all tests with different server timezone.
// @codingStandardsIgnoreStart
date_default_timezone_set( 'Pacific/Fiji' );
// @codingStandardsIgnoreEnd
$this->test_set_date_prop_gmt_offset();
$this->test_set_date_prop_timezone_string();
// Repeat all tests with different server timezone.
// @codingStandardsIgnoreStart
date_default_timezone_set( 'Pacific/Tahiti' );
// @codingStandardsIgnoreEnd
$this->test_set_date_prop_gmt_offset();
$this->test_set_date_prop_timezone_string();
// Restore to UTC.
// @codingStandardsIgnoreStart
date_default_timezone_set( 'UTC' );
// @codingStandardsIgnoreEnd
}
/**
@ -408,7 +414,7 @@ class WC_Tests_CRUD_Data extends WC_Unit_Test_Case {
$changes = array(
'prop1' => 'new_value1',
'prop3' => 'value3'
'prop3' => 'value3',
);
$object = new WC_Mock_WC_Data;

View File

@ -33,7 +33,7 @@ class WC_Tests_Order_Item_Functions extends WC_Unit_Test_Case {
$item_id = $item->get_id();
// Test that the initial key doesn't exist.
$item = new WC_Order_Item_Product( $item_id );;
$item = new WC_Order_Item_Product( $item_id );
$this->assertEmpty( $item->get_meta( '_test_key' ) );
$this->assertEmpty( wc_get_order_item_meta( $item_id, '_test_key' ) );