Skip to content

Commit b194914

Browse files
anzinkaryna-t
authored andcommitted
Fixed warning missing required argument $name
1 parent a209d18 commit b194914

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/AbstractProductExportImportTestCase.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\CatalogImportExport\Model;
77

8+
use Magento\CatalogImportExport\Model\Export\Product;
89
use Magento\Framework\App\Bootstrap;
910
use Magento\Framework\App\Filesystem\DirectoryList;
1011
use Magento\ImportExport\Model\Export\Adapter\AbstractAdapter;
@@ -358,13 +359,10 @@ protected function executeImportReplaceTest(
358359
$index++;
359360
}
360361

361-
$exportProduct = $this->objectManager->create(\Magento\CatalogImportExport\Model\Export\Product::class);
362+
$exportProduct = $this->objectManager->create(Product::class);
362363
if ($usePagination) {
363364
/** @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');
368366
$itemsPerPageProperty->setAccessible(true);
369367
$itemsPerPageProperty->setValue($exportProduct, 1);
370368
}
@@ -407,16 +405,16 @@ protected function executeImportReplaceTest(
407405
/**
408406
* Export products in the system.
409407
*
410-
* @param \Magento\CatalogImportExport\Model\Export\Product|null $exportProduct
408+
* @param Product|null $exportProduct
411409
* @return string Return exported file
412410
*/
413-
private function exportProducts(\Magento\CatalogImportExport\Model\Export\Product $exportProduct = null)
411+
private function exportProducts(Product $exportProduct = null)
414412
{
415413
$csvfile = uniqid('importexport_') . '.csv';
416414
$this->csvFile = $csvfile;
417415

418416
$exportProduct = $exportProduct ?: $this->objectManager->create(
419-
\Magento\CatalogImportExport\Model\Export\Product::class
417+
Product::class
420418
);
421419
$this->writer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
422420
\Magento\ImportExport\Model\Export\Adapter\Csv::class,

0 commit comments

Comments
 (0)