Skip to content

Commit 421a75b

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 63d1043 commit 421a75b

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

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

Lines changed: 0 additions & 7 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\FileSystem|\PHPUnit_Framework_MockObject_MockObject
58-
*/
59-
private $fileSystem;
60-
6156
/**
6257
* @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject
6358
*/
@@ -108,7 +103,6 @@ protected function setUp()
108103
->with(DirectoryList::MEDIA)
109104
->will($this->returnValue($this->mediaDirectory));
110105
$this->factory = $this->getMock(\Magento\Framework\Image\Factory::class, [], [], '', false);
111-
$this->fileSystem = $this->getMock(\Magento\Framework\View\FileSystem::class, [], [], '', false);
112106

113107
$this->viewAssetImageFactory = $this->getMockBuilder(ImageFactory::class)
114108
->disableOriginalConstructor()
@@ -127,7 +121,6 @@ protected function setUp()
127121
'coreFileStorageDatabase' => $this->coreFileHelper,
128122
'filesystem' => $this->filesystem,
129123
'imageFactory' => $this->factory,
130-
'viewFileSystem' => $this->fileSystem,
131124
'viewAssetImageFactory' => $this->viewAssetImageFactory,
132125
'viewAssetPlaceholderFactory' => $this->viewAssetPlaceholderFactory
133126
]

dev/tests/static/testsuite/Magento/Test/Legacy/AutogeneratedClassNotInConstructorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private function getWhitelistedClasses()
106106
{
107107
if (!$this->autogeneratedClassesWhitelist) {
108108
$this->autogeneratedClassesWhitelist = require_once __DIR__
109-
. '/_files/autogenerated_class_not_in_contructor_whitelist.php';
109+
. '/_files/autogenerated_class_not_in_constructor_whitelist.php';
110110
}
111111
return $this->autogeneratedClassesWhitelist;
112112
}

0 commit comments

Comments
 (0)