Fix formatting errors in orders.php

This commit is contained in:
Shiki 2020-09-01 14:21:14 -06:00
parent ecb2936f9e
commit 64bd1e0fd5
1 changed files with 5 additions and 5 deletions

View File

@ -155,7 +155,7 @@ class WC_Tests_API_Orders extends WC_REST_Unit_Test_Case {
$site_level_attribute_id = wc_create_attribute( array( 'name' => 'Site Level Type' ) );
$site_level_attribute_slug = wc_attribute_taxonomy_name_by_id( $site_level_attribute_id );
// Register the attribute so that wp_insert_term will be successful
// Register the attribute so that wp_insert_term will be successful.
register_taxonomy( $site_level_attribute_slug, array( 'product' ), array() );
$site_level_term_insertion_result = wp_insert_term( 'Site Level Value - Wood', $site_level_attribute_slug );
@ -166,9 +166,9 @@ class WC_Tests_API_Orders extends WC_REST_Unit_Test_Case {
$line_item = new WC_Order_Item_Product();
$line_item->set_product( $variation );
$line_item->set_props( array(
'variation' => array( "attribute_{$site_level_attribute_slug}" => $site_level_term->slug )
) );
$line_item->set_props(
array( 'variation' => array( "attribute_{$site_level_attribute_slug}" => $site_level_term->slug ) )
);
$order = \Automattic\WooCommerce\RestApi\UnitTests\Helpers\OrderHelper::create_order();
$order->add_item( $line_item );
@ -870,6 +870,6 @@ class WC_Tests_API_Orders extends WC_REST_Unit_Test_Case {
$meta_data_item_properties = $line_item_properties['meta_data']['items']['properties'];
$this->assertEquals( 5, count( $meta_data_item_properties ) );
$this->assertEquals( [ 'id', 'key', 'value', 'display_key', 'display_value' ], array_keys( $meta_data_item_properties ) );
$this->assertEquals( array( 'id', 'key', 'value', 'display_key', 'display_value' ), array_keys( $meta_data_item_properties ) );
}
}