diff --git a/plugins/woocommerce/changelog/48989-sku-fix-failing-test b/plugins/woocommerce/changelog/48989-sku-fix-failing-test new file mode 100644 index 00000000000..35377024795 --- /dev/null +++ b/plugins/woocommerce/changelog/48989-sku-fix-failing-test @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak +Comment: No changelog entry is required, as this just changes a unit test to workaround an issue. + diff --git a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-product-custom-fields-controller-tests.php b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-product-custom-fields-controller-tests.php index ff18aeadb5d..c6641c6d8a1 100644 --- a/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-product-custom-fields-controller-tests.php +++ b/plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version3/class-wc-rest-product-custom-fields-controller-tests.php @@ -16,34 +16,9 @@ class WC_REST_Product_Custom_Fields_Controller_Tests extends WC_REST_Unit_Test_C * @return void */ public static function wpSetUpBeforeClass() { - self::$products[] = WC_Helper_Product::create_simple_product( - true, - array( - 'name' => 'Pancake', - 'sku' => 'pancake-1', - ) - ); - self::$products[] = WC_Helper_Product::create_simple_product( - true, - array( - 'name' => 'Waffle 1', - 'sku' => 'pancake-2', - ) - ); - self::$products[] = WC_Helper_Product::create_simple_product( - true, - array( - 'name' => 'French Toast', - 'sku' => 'waffle-2', - ) - ); - self::$products[] = WC_Helper_Product::create_simple_product( - true, - array( - 'name' => 'Waffle 3', - 'sku' => 'waffle-3', - ) - ); + for ( $i = 1; $i <= 4; $i ++ ) { + self::$products[] = WC_Helper_Product::create_simple_product(); + } foreach ( self::$products as $product ) { for ( $i = 0; $i < 20; $i++ ) {