Skip to content

Commit 3984f38

Browse files
committed
B2B-2020: [AWS S3] [Integration Tests]: Investigate Test Failures in AdvancedPricingImportExport module
1 parent fc59d3b commit 3984f38

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

dev/tests/integration/testsuite/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricingTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,16 @@ public function testImportDelete()
192192
$exportModel->setWriter(
193193
\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
194194
\Magento\ImportExport\Model\Export\Adapter\Csv::class,
195-
['fileSystem' => $this->fileSystem, 'destination' => $csvfile]
195+
['fileSystem' => $this->fileSystem]
196196
)
197197
);
198-
$this->assertNotEmpty($exportModel->export());
198+
$exportContent = $exportModel->export();
199+
$this->assertNotEmpty($exportContent);
199200

200-
$errors = $this->doImport($csvfile, DirectoryList::VAR_DIR, Import::BEHAVIOR_DELETE, true);
201+
$directory = $this->fileSystem->getDirectoryWrite(DirectoryList::VAR_IMPORT_EXPORT);
202+
$directory->getDriver()->filePutContents($directory->getAbsolutePath($csvfile), $exportContent);
203+
204+
$errors = $this->doImport($csvfile, DirectoryList::VAR_IMPORT_EXPORT, Import::BEHAVIOR_DELETE, true);
201205

202206
$this->assertTrue(
203207
$errors->getErrorsCount() == 0,

0 commit comments

Comments
 (0)