From fed94cbd0cffd0c15fd2af87cc2e44e7d1da405a Mon Sep 17 00:00:00 2001 From: Peter Fabian Date: Wed, 23 Jan 2019 10:34:07 +0100 Subject: [PATCH] Added segmenting to response for coupons/stats test. Changed return type for currency. --- .../tests/reports/class-wc-tests-reports-coupons-stats.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce-admin/tests/reports/class-wc-tests-reports-coupons-stats.php b/plugins/woocommerce-admin/tests/reports/class-wc-tests-reports-coupons-stats.php index f9c6cc201f6..e130bfb0c6a 100644 --- a/plugins/woocommerce-admin/tests/reports/class-wc-tests-reports-coupons-stats.php +++ b/plugins/woocommerce-admin/tests/reports/class-wc-tests-reports-coupons-stats.php @@ -72,9 +72,10 @@ class WC_Tests_Reports_Coupons_Stats extends WC_Unit_Test_Case { 'pages' => 1, 'page_no' => 1, 'totals' => (object) array( - 'amount' => 2 * $coupon_1_amount + $coupon_2_amount, + 'amount' => floatval( 2 * $coupon_1_amount + $coupon_2_amount ), 'coupons_count' => 2, 'orders_count' => 2, + 'segments' => array(), ), 'intervals' => array( array( @@ -84,9 +85,10 @@ class WC_Tests_Reports_Coupons_Stats extends WC_Unit_Test_Case { 'date_end' => $end_datetime->format( 'Y-m-d H:i:s' ), 'date_end_gmt' => $end_datetime->format( 'Y-m-d H:i:s' ), 'subtotals' => (object) array( - 'amount' => 2 * $coupon_1_amount + $coupon_2_amount, + 'amount' => floatval( 2 * $coupon_1_amount + $coupon_2_amount ), 'coupons_count' => 2, 'orders_count' => 2, + 'segments' => array(), ), ), ),