@@ -29,6 +29,8 @@ protected function setUp()
29
29
}
30
30
31
31
/**
32
+ * Testing fulltext index rebuild.
33
+ *
32
34
* @magentoDataFixture Magento/CatalogSearch/_files/products_for_index.php
33
35
* @magentoDataFixture Magento/CatalogSearch/_files/product_configurable_not_available.php
34
36
* @magentoDataFixture Magento/Framework/Search/_files/product_configurable.php
@@ -58,6 +60,8 @@ public function testGetIndexData()
58
60
}
59
61
60
62
/**
63
+ * Prepare and return expected index data.
64
+ *
61
65
* @return array
62
66
*/
63
67
private function getExpectedIndexData ()
@@ -68,32 +72,49 @@ private function getExpectedIndexData()
68
72
$ nameId = $ attributeRepository ->get (ProductInterface::NAME )->getAttributeId ();
69
73
/** @see dev/tests/integration/testsuite/Magento/Framework/Search/_files/configurable_attribute.php */
70
74
$ configurableId = $ attributeRepository ->get ('test_configurable ' )->getAttributeId ();
75
+ $ statusId = $ attributeRepository ->get (ProductInterface::STATUS )->getAttributeId ();
76
+ $ taxClassId = $ attributeRepository
77
+ ->get (\Magento \Customer \Api \Data \GroupInterface::TAX_CLASS_ID )
78
+ ->getAttributeId ();
79
+
71
80
return [
72
81
'configurable ' => [
73
82
$ skuId => 'configurable ' ,
74
83
$ configurableId => 'Option 1 | Option 2 ' ,
75
84
$ nameId => 'Configurable Product | Configurable OptionOption 1 | Configurable OptionOption 2 ' ,
85
+ $ taxClassId => 'Taxable Goods | Taxable Goods | Taxable Goods ' ,
86
+ $ statusId => 'Enabled | Enabled | Enabled ' ,
76
87
],
77
88
'index_enabled ' => [
78
89
$ skuId => 'index_enabled ' ,
79
90
$ nameId => 'index enabled ' ,
91
+ $ taxClassId => 'Taxable Goods ' ,
92
+ $ statusId => 'Enabled ' ,
80
93
],
81
94
'index_visible_search ' => [
82
95
$ skuId => 'index_visible_search ' ,
83
96
$ nameId => 'index visible search ' ,
97
+ $ taxClassId => 'Taxable Goods ' ,
98
+ $ statusId => 'Enabled ' ,
84
99
],
85
100
'index_visible_category ' => [
86
101
$ skuId => 'index_visible_category ' ,
87
102
$ nameId => 'index visible category ' ,
103
+ $ taxClassId => 'Taxable Goods ' ,
104
+ $ statusId => 'Enabled ' ,
88
105
],
89
106
'index_visible_both ' => [
90
107
$ skuId => 'index_visible_both ' ,
91
108
$ nameId => 'index visible both ' ,
109
+ $ taxClassId => 'Taxable Goods ' ,
110
+ $ statusId => 'Enabled ' ,
92
111
]
93
112
];
94
113
}
95
114
96
115
/**
116
+ * Testing fulltext index rebuild with configurations.
117
+ *
97
118
* @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php
98
119
*/
99
120
public function testRebuildStoreIndexConfigurable ()
@@ -114,6 +135,8 @@ public function testRebuildStoreIndexConfigurable()
114
135
}
115
136
116
137
/**
138
+ * Get product Id by its SKU.
139
+ *
117
140
* @param string $sku
118
141
* @return int
119
142
*/
0 commit comments