|
5 | 5 | */
|
6 | 6 | namespace Magento\CatalogImportExport\Model;
|
7 | 7 |
|
| 8 | +use Magento\CatalogImportExport\Model\Export\Product; |
8 | 9 | use Magento\Framework\App\Bootstrap;
|
9 | 10 | use Magento\Framework\App\Filesystem\DirectoryList;
|
10 | 11 | use Magento\ImportExport\Model\Export\Adapter\AbstractAdapter;
|
@@ -358,13 +359,10 @@ protected function executeImportReplaceTest(
|
358 | 359 | $index++;
|
359 | 360 | }
|
360 | 361 |
|
361 |
| - $exportProduct = $this->objectManager->create(\Magento\CatalogImportExport\Model\Export\Product::class); |
| 362 | + $exportProduct = $this->objectManager->create(Product::class); |
362 | 363 | if ($usePagination) {
|
363 | 364 | /** @var \ReflectionProperty $itemsPerPageProperty */
|
364 |
| - $itemsPerPageProperty = $this->objectManager->create(\ReflectionProperty::class, [ |
365 |
| - 'class' => \Magento\CatalogImportExport\Model\Export\Product::class, |
366 |
| - 'property' => '_itemsPerPage' |
367 |
| - ]); |
| 365 | + $itemsPerPageProperty = new \ReflectionProperty(Product::class, '_itemsPerPage'); |
368 | 366 | $itemsPerPageProperty->setAccessible(true);
|
369 | 367 | $itemsPerPageProperty->setValue($exportProduct, 1);
|
370 | 368 | }
|
@@ -407,16 +405,16 @@ protected function executeImportReplaceTest(
|
407 | 405 | /**
|
408 | 406 | * Export products in the system.
|
409 | 407 | *
|
410 |
| - * @param \Magento\CatalogImportExport\Model\Export\Product|null $exportProduct |
| 408 | + * @param Product|null $exportProduct |
411 | 409 | * @return string Return exported file
|
412 | 410 | */
|
413 |
| - private function exportProducts(\Magento\CatalogImportExport\Model\Export\Product $exportProduct = null) |
| 411 | + private function exportProducts(Product $exportProduct = null) |
414 | 412 | {
|
415 | 413 | $csvfile = uniqid('importexport_') . '.csv';
|
416 | 414 | $this->csvFile = $csvfile;
|
417 | 415 |
|
418 | 416 | $exportProduct = $exportProduct ?: $this->objectManager->create(
|
419 |
| - \Magento\CatalogImportExport\Model\Export\Product::class |
| 417 | + Product::class |
420 | 418 | );
|
421 | 419 | $this->writer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
|
422 | 420 | \Magento\ImportExport\Model\Export\Adapter\Csv::class,
|
|
0 commit comments