This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
dev/tests/integration/testsuite/Magento/CatalogImportExport/Model Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -140,4 +140,32 @@ public function importReplaceDataProvider()
140
140
{
141
141
return $ this ->exportImportDataProvider ();
142
142
}
143
+
144
+ /**
145
+ * Fixing https://github.com/magento-engcom/import-export-improvements/issues/50 means that during import images
146
+ * can now get renamed for this we need to skip the attribute checking and instead check that the images contain
147
+ * the right beginning part of the name. When an image is named "magento_image.jpeg" but there is already an image
148
+ * with that name it will now become "magento_image_1.jpeg"
149
+ *
150
+ * @param \Magento\Catalog\Model\Product $expectedProduct
151
+ * @param \Magento\Catalog\Model\Product $actualProduct
152
+ */
153
+ protected function assertEqualsSpecificAttributes ($ expectedProduct , $ actualProduct )
154
+ {
155
+ if (!empty ($ actualProduct ->getImage ())
156
+ && !empty ($ expectedProduct ->getImage ())
157
+ ) {
158
+ $ this ->assertContains ('magento_image ' , $ actualProduct ->getImage ());
159
+ }
160
+ if (!empty ($ actualProduct ->getSmallImage ())
161
+ && !empty ($ expectedProduct ->getSmallImage ())
162
+ ) {
163
+ $ this ->assertContains ('magento_image ' , $ actualProduct ->getSmallImage ());
164
+ }
165
+ if (!empty ($ actualProduct ->getThumbnail ())
166
+ && !empty ($ expectedProduct ->getThumbnail ())
167
+ ) {
168
+ $ this ->assertContains ('magento_image ' , $ actualProduct ->getThumbnail ());
169
+ }
170
+ }
143
171
}
You can’t perform that action at this time.
0 commit comments