Skip to content

Commit a44f50a

Browse files
author
Stanislav Idolov
committed
magento-engcom/magento2ce#2781: Fixed integration test (Travis failures)
1 parent c26f2ac commit a44f50a

File tree

1 file changed

+1
-18
lines changed
  • dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import

1 file changed

+1
-18
lines changed

dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,6 @@ public function testAddUpdateProductWithInvalidUrlKeys() : void
15951595
/**
15961596
* Make sure the non existing image in the csv file won't erase the qty key of the existing products.
15971597
*
1598-
* @magentoDataFixture Magento/CatalogImportExport/Model/Import/_files/products_to_import_with_non_existing_image.csv
15991598
* @magentoDbIsolation enabled
16001599
* @magentoAppIsolation enabled
16011600
*/
@@ -1604,24 +1603,8 @@ public function testImportWithNonExistingImage()
16041603
$products = [
16051604
'simple_new' => 100,
16061605
];
1607-
$filesystem = $this->objectManager->create(\Magento\Framework\Filesystem::class);
1608-
$directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
1609-
$source = $this->objectManager->create(
1610-
\Magento\ImportExport\Model\Import\Source\Csv::class,
1611-
[
1612-
'file' => __DIR__ . '/_files/products_to_import_with_non_existing_image.csv',
1613-
'directory' => $directory
1614-
]
1615-
);
16161606

1617-
$errors = $this->_model->setParameters(
1618-
['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND, 'entity' => 'catalog_product']
1619-
)
1620-
->setSource($source)
1621-
->validateData();
1622-
1623-
$this->assertTrue($errors->getErrorsCount() == 0);
1624-
$this->_model->importData();
1607+
$this->importFile('products_to_import_with_non_existing_image.csv');
16251608

16261609
$productRepository = $this->objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class);
16271610
foreach ($products as $productSku => $productQty) {

0 commit comments

Comments
 (0)