Skip unsupported tests with HPOS.
This commit is contained in:
parent
a76a415487
commit
c06ee8f794
|
@ -5,6 +5,8 @@
|
||||||
* @package WooCommerce\Tests\Admin
|
* @package WooCommerce\Tests\Admin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Automattic\WooCommerce\Utilities\OrderUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for the WC_Admin_Report class.
|
* Tests for the WC_Admin_Report class.
|
||||||
*/
|
*/
|
||||||
|
@ -37,6 +39,9 @@ class WC_Tests_Admin_Dashboard extends WC_Unit_Test_Case {
|
||||||
* Test: get_status_widget
|
* Test: get_status_widget
|
||||||
*/
|
*/
|
||||||
public function test_status_widget() {
|
public function test_status_widget() {
|
||||||
|
if ( OrderUtil::custom_orders_table_usage_is_enabled() ) {
|
||||||
|
$this->markTestSkipped( 'We don\'t support legacy reports in HPOS.' );
|
||||||
|
}
|
||||||
wp_set_current_user( $this->user );
|
wp_set_current_user( $this->user );
|
||||||
$order = WC_Helper_Order::create_order();
|
$order = WC_Helper_Order::create_order();
|
||||||
$order->set_status( 'completed' );
|
$order->set_status( 'completed' );
|
||||||
|
@ -58,6 +63,9 @@ class WC_Tests_Admin_Dashboard extends WC_Unit_Test_Case {
|
||||||
* Test: get_status_widget with woo admin disabled.
|
* Test: get_status_widget with woo admin disabled.
|
||||||
*/
|
*/
|
||||||
public function test_status_widget_with_woo_admin_disabled() {
|
public function test_status_widget_with_woo_admin_disabled() {
|
||||||
|
if ( OrderUtil::custom_orders_table_usage_is_enabled() ) {
|
||||||
|
$this->markTestSkipped( 'We don\'t support legacy reports in HPOS.' );
|
||||||
|
}
|
||||||
wp_set_current_user( $this->user );
|
wp_set_current_user( $this->user );
|
||||||
$order = WC_Helper_Order::create_order();
|
$order = WC_Helper_Order::create_order();
|
||||||
$order->set_status( 'completed' );
|
$order->set_status( 'completed' );
|
||||||
|
|
Loading…
Reference in New Issue