File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
CatalogImportExport/Model/Import
Catalog/Test/Unit/Block/Product/View Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 55 */
66namespace Magento \Catalog \Test \Unit \Block \Product \View ;
77
8+ /**
9+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
10+ */
811class GalleryTest extends \PHPUnit \Framework \TestCase
912{
1013 /**
Original file line number Diff line number Diff line change 2020use Magento \ImportExport \Model \Import \ErrorProcessing \ProcessingError ;
2121use Magento \ImportExport \Model \Import \ErrorProcessing \ProcessingErrorAggregatorInterface ;
2222use Magento \Store \Model \Store ;
23+ use Magento \Framework \App \ObjectManager ;
2324
2425/**
2526 * Import entity product model
@@ -830,12 +831,9 @@ public function __construct(
830831 $ this ->scopeConfig = $ scopeConfig ;
831832 $ this ->productUrl = $ productUrl ;
832833 $ this ->dateAttrCodes = array_merge ($ this ->dateAttrCodes , $ dateAttrCodes );
833- $ this ->catalogConfig = $ catalogConfig ?: \Magento \Framework \App \ObjectManager::getInstance ()
834- ->get (CatalogConfig::class);
835- $ this ->imageTypeProcessor = $ imageTypeProcessor ?: \Magento \Framework \App \ObjectManager::getInstance ()
836- ->get (ImageTypeProcessor::class);
837- $ this ->mediaProcessor = $ mediaProcessor ?: \Magento \Framework \App \ObjectManager::getInstance ()
838- ->get (MediaGalleryProcessor::class);
834+ $ this ->catalogConfig = $ catalogConfig ?: ObjectManager::getInstance ()->get (CatalogConfig::class);
835+ $ this ->imageTypeProcessor = $ imageTypeProcessor ?: ObjectManager::getInstance ()->get (ImageTypeProcessor::class);
836+ $ this ->mediaProcessor = $ mediaProcessor ?: ObjectManager::getInstance ()->get (MediaGalleryProcessor::class);
839837
840838 parent ::__construct (
841839 $ jsonHelper ,
You can’t perform that action at this time.
0 commit comments