Check for `recorded_sales` op data in COT migration tests

This commit is contained in:
Jorge A. Torres 2022-05-09 08:15:06 -05:00
parent 086f318299
commit 992f936fae
2 changed files with 5 additions and 0 deletions

View File

@ -206,6 +206,7 @@ class OrderHelper {
$order->set_prices_include_tax( true );
wc_update_coupon_usage_counts( $order->get_id() );
$order->get_data_store()->set_download_permissions_granted( $order, true );
$order->get_data_store()->set_recorded_sales( $order, true );
$order->set_cart_hash( '1234' );
$order->update_meta_data( '_new_order_email_sent', 'true' );
$order->update_meta_data( '_order_stock_reduced', 'true' );

View File

@ -311,6 +311,10 @@ WHERE order_id = {$order_id} AND meta_key = 'non_unique_key_1' AND meta_value in
$this->assertEquals( (float) $order->get_shipping_total(), (float) $db_order_op_data->shipping_total_amount );
$this->assertEquals( (float) $order->get_discount_tax(), (float) $db_order_op_data->discount_tax_amount );
$this->assertEquals( (float) $order->get_discount_total(), (float) $db_order_op_data->discount_total_amount );
$this->assertEquals(
$order->get_data_store()->get_recorded_sales( $order ),
(bool) $db_order_op_data->recorded_sales
);
}
/**