Skip to content

Commit 63d1043

Browse files
author
Igor Melnikov
committed
MAGETWO-67871: Requesting autogenerated classes that are not in constructor cause fatal errors in production mode
- refactor
1 parent 77a5ad1 commit 63d1043

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

app/code/Magento/Catalog/Test/Unit/Model/Product/ImageTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ class ImageTest extends \PHPUnit_Framework_TestCase
5353
*/
5454
private $factory;
5555

56-
/**
57-
* @var \Magento\Framework\View\Asset\Repository|\PHPUnit_Framework_MockObject_MockObject
58-
*/
59-
private $repository;
60-
6156
/**
6257
* @var \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject
6358
*/
@@ -113,7 +108,6 @@ protected function setUp()
113108
->with(DirectoryList::MEDIA)
114109
->will($this->returnValue($this->mediaDirectory));
115110
$this->factory = $this->getMock(\Magento\Framework\Image\Factory::class, [], [], '', false);
116-
$this->repository = $this->getMock(\Magento\Framework\View\Asset\Repository::class, [], [], '', false);
117111
$this->fileSystem = $this->getMock(\Magento\Framework\View\FileSystem::class, [], [], '', false);
118112

119113
$this->viewAssetImageFactory = $this->getMockBuilder(ImageFactory::class)
@@ -133,11 +127,7 @@ protected function setUp()
133127
'coreFileStorageDatabase' => $this->coreFileHelper,
134128
'filesystem' => $this->filesystem,
135129
'imageFactory' => $this->factory,
136-
'assetRepo' => $this->repository,
137130
'viewFileSystem' => $this->fileSystem,
138-
'resource' => null,
139-
'resourceCollection' => null,
140-
'data' => [],
141131
'viewAssetImageFactory' => $this->viewAssetImageFactory,
142132
'viewAssetPlaceholderFactory' => $this->viewAssetPlaceholderFactory
143133
]

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
// @codingStandardsIgnoreFile
8-
96
namespace Magento\CatalogImportExport\Model\Import;
107

118
use Magento\Catalog\Model\Product\Visibility;
@@ -28,6 +25,7 @@
2825
* @SuppressWarnings(PHPMD.TooManyFields)
2926
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
3027
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
28+
* @codingStandardsIgnoreFile
3129
*/
3230
class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
3331
{

0 commit comments

Comments
 (0)