Skip failing tests in WP 5.3 and 5.4 (https://github.com/woocommerce/woocommerce-admin/pull/6209)
* Skip failing tests in WP 5.3 and 5.4 * Add a reason for the skipping
This commit is contained in:
parent
e65dabdcb6
commit
e02429dff3
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue