woocommerce / woocommerce-product-tables-feature-plugin

Implements new data-stores and moves product data into custom tables, with a new, normalised data structure.
GNU General Public License v3.0
192 stars 32 forks source link

Fix test WC_Tests_Product_Data_Store::test_save_default_attributes() #79

Closed rodrigoprimo closed 6 years ago

rodrigoprimo commented 6 years ago

This test is failing with the following error message:

6) WC_Tests_Product_Data_Store::test_save_default_attributes
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
+    'sample-attribute-true-0' => '0'
+    'sample-attribute-true-1' => 1
+    'sample-attribute-true-2' => 'true'
+    'sample-attribute-true-3' => 'false'
+    'sample-attribute-true-4' => Array (...)
+    'sample-attribute-false-4' => stdClass Object (...)

wp-content/plugins/woocommerce/tests/unit-tests/product/data-store.php:389
rodrigoprimo commented 6 years ago

Probably related:

4) WC_Tests_Product_Data::test_product_getters_and_setters
attributes
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'test-attribute' => WC_Product_Attribute Object (
         'data' => Array (
             'attribute_id' => 0
-            'product_attribute_id' => 0
+            'product_attribute_id' => 25

This failure was hidden by another failure in the same test that was fixed in #91.