* Skip failing tests in WP 5.3 and 5.4

* Add a reason for the skipping
This commit is contained in:
Moon 2021-01-27 20:02:35 -08:00 committed by GitHub
parent e65dabdcb6
commit e02429dff3
2 changed files with 15 additions and 0 deletions

View File

@ -132,6 +132,11 @@ class WC_Tests_API_Reports_Orders_Stats extends WC_REST_Unit_Test_Case {
* Test filtering by product attribute(s). * Test filtering by product attribute(s).
*/ */
public function test_product_attributes_filter() { public function test_product_attributes_filter() {
global $wp_version;
if ( version_compare( $wp_version, '5.5', '<' ) ) {
$this->markTestSkipped( 'Skipped in older versions of WordPress due to a bug in WP when validating arrays.' );
}
global $wpdb; global $wpdb;
wp_set_current_user( $this->user ); wp_set_current_user( $this->user );
WC_Helper_Reports::reset_stats_dbs(); WC_Helper_Reports::reset_stats_dbs();

View File

@ -133,6 +133,11 @@ class WC_Tests_API_Reports_Orders extends WC_REST_Unit_Test_Case {
* Test filtering by taxonomy-backed product attribute(s). * Test filtering by taxonomy-backed product attribute(s).
*/ */
public function test_product_attributes_filter() { public function test_product_attributes_filter() {
global $wp_version;
if ( version_compare( $wp_version, '5.5', '<' ) ) {
$this->markTestSkipped( 'Skipped in older versions of WordPress due to a bug in WP when validating arrays.' );
}
wp_set_current_user( $this->user ); wp_set_current_user( $this->user );
WC_Helper_Reports::reset_stats_dbs(); WC_Helper_Reports::reset_stats_dbs();
@ -236,6 +241,11 @@ class WC_Tests_API_Reports_Orders extends WC_REST_Unit_Test_Case {
* Test filtering by custom product attribute(s). * Test filtering by custom product attribute(s).
*/ */
public function test_custom_product_attributes_filter() { public function test_custom_product_attributes_filter() {
global $wp_version;
if ( version_compare( $wp_version, '5.5', '<' ) ) {
$this->markTestSkipped( 'Skipped in older versions of WordPress due to a bug in WP when validating arrays.' );
}
wp_set_current_user( $this->user ); wp_set_current_user( $this->user );
WC_Helper_Reports::reset_stats_dbs(); WC_Helper_Reports::reset_stats_dbs();