Skip to content

Commit

Permalink
Merge pull request #2754 from woocommerce/dev/fix-tests-wc9.6
Browse files Browse the repository at this point in the history
Fix tests in WooCommerce 9.6
  • Loading branch information
puntope authored Jan 9, 2025
2 parents 9e7cc02 + cbc54db commit 90b564d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ public function test_maps_rules_product_fields_weight_with_units() {
$adapted_product = $this->generate_attribute_mapping_adapted_product( $rules );
$adapted_variation = $this->generate_attribute_mapping_adapted_product_variant( $rules );

$this->assertEquals( '1.1 kg', $adapted_product->getPattern() );
$this->assertEquals( '1.2 kg', $adapted_variation->getPattern() );
$this->assertEquals( '1.1 ' . get_option( 'woocommerce_weight_unit', 'lbs' ), $adapted_product->getPattern() );
$this->assertEquals( '1.2 ' . get_option( 'woocommerce_weight_unit', 'lbs' ), $adapted_variation->getPattern() );
}

/**
Expand Down
3 changes: 3 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ function load_plugins() {
require_once $wc_dir . '/woocommerce.php';
update_option( 'woocommerce_db_version', WC()->version );

// Be sure the WooCommerce features are loaded on the test environment
add_filter( 'woocommerce_admin_should_load_features', '__return_true' );

require $gla_dir . '/google-listings-and-ads.php';
}

Expand Down

0 comments on commit 90b564d

Please sign in to comment.