Skip to content

Commit 5e20120

Browse files
committed
B2B-2023: [AWS S3] [Integration Tests]: Investigate Test Failures in CatalogImportExport module
1 parent 9849588 commit 5e20120

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

app/code/Magento/ImportExport/Model/Import/Source/Csv.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public function __construct(
5656
$delimiter = ',',
5757
$enclosure = '"'
5858
) {
59+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
5960
register_shutdown_function([$this, 'destruct']);
6061
try {
6162
$this->filePath = $directory->getRelativePath($file);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ abstract class AbstractProductExportImportTestCase extends \PHPUnit\Framework\Te
4242
protected $fixtures;
4343

4444
/**
45-
* skipped attributes
45+
* List of attributes which will be skipped
4646
*
4747
* @var array
4848
*/

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* @see \Magento\CatalogImportExport\Model\Import\Product
3333
*
3434
* @magentoAppArea adminhtml
35+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
3536
*/
3637
class ImportWithNotExistImagesTest extends TestCase
3738
{

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
*/
4343
class ProductTestBase extends TestCase
4444
{
45-
protected const LONG_FILE_NAME_IMAGE = 'magento_long_image_name_magento_long_image_name_magento_long_image_name.jpg';
45+
protected const LONG_FILE_NAME_IMAGE =
46+
'magento_long_image_name_magento_long_image_name_magento_long_image_name.jpg';
4647

4748
/**
4849
* @var array
@@ -95,7 +96,7 @@ protected function setUp(): void
9596
}
9697

9798
/**
98-
* @inheriDoc
99+
* @inheritDoc
99100
*/
100101
protected function tearDown(): void
101102
{
@@ -115,8 +116,9 @@ protected function tearDown(): void
115116
$image->__destruct();
116117
}
117118

118-
119119
/**
120+
* Creates import model based on given file
121+
*
120122
* @param string $pathToFile
121123
* @param string $behavior
122124
* @return \Magento\CatalogImportExport\Model\Import\Product
@@ -299,7 +301,6 @@ protected function importDataForMediaTest(string $fileName, int $expectedErrors
299301
->getApplication()
300302
->getInitParams()[Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS];
301303

302-
303304
if (!$rootDirectory->getDriver() instanceof Filesystem\Driver\File) {
304305
$mediaPath = 'media';
305306
$varPath = 'media';
@@ -459,6 +460,8 @@ protected function assertProductRequestPath($storeCode, $expected)
459460
}
460461

461462
/**
463+
* Asserts expected errors count with actual
464+
*
462465
* @param int $count
463466
* @param ProcessingErrorAggregatorInterface $errors
464467
*/
@@ -496,8 +499,7 @@ private static function copyFile(string $source, string $destination, Filesystem
496499
}
497500

498501
/**
499-
* Returns path to media directory based on directory driver.
500-
* Returns `media` for drivers different from File
502+
* Returns path to media directory based on directory driver. Returns `media` for drivers different from File
501503
*
502504
* @param Filesystem\Directory\WriteInterface $directory
503505
* @return string

0 commit comments

Comments
 (0)