@@ -54,6 +54,11 @@ class StorageTest extends TestCase
54
54
*/
55
55
private $ imagesStorage ;
56
56
57
+ /**
58
+ * @var Storage
59
+ */
60
+ private $ imagesStorageWithZeroHeight ;
61
+
57
62
/**
58
63
* @var MockObject
59
64
*/
@@ -294,7 +299,7 @@ function ($path) {
294
299
295
300
$ this ->imagesStorage = $ this ->objectManagerHelper ->getObject (
296
301
Storage::class,
297
- $ this ->getStorageClass (100 , 50 , $ allowedExtensions )
302
+ $ this ->getStorageClass (100 , 50 , $ allowedExtensions )
298
303
);
299
304
300
305
$ this ->imagesStorageWithZeroHeight = $ this ->objectManagerHelper ->getObject (
@@ -711,7 +716,6 @@ public function testResizeFileWithZeroHeight()
711
716
->method ('fileGetContents ' )
712
717
->willReturn ('some content ' );
713
718
714
-
715
719
$ image = $ this ->getMockBuilder (image::class)
716
720
->disableOriginalConstructor ()
717
721
->addMethods (['open ' , 'keepAspectRatio ' ])
@@ -721,8 +725,6 @@ public function testResizeFileWithZeroHeight()
721
725
$ image ->expects ($ this ->any ())->method ('keepAspectRatio ' )->with (true );
722
726
$ image ->expects ($ this ->once ())->method ('resize ' )->with (100 , 0 )
723
727
->willThrowException (new \LogicException ($ exceptionMessage ));
724
-
725
-
726
728
$ this ->adapterFactoryMock ->expects ($ this ->atLeastOnce ())->method ('create ' )->willReturn ($ image );
727
729
728
730
// Logger should not log any critical errors in this scenario
@@ -761,5 +763,5 @@ public function getStorageClass($width, $height, $allowedExtensions)
761
763
'coreConfig ' => $ this ->coreConfigMock ,
762
764
'logger ' => $ this ->loggerMock
763
765
];
764
- }
766
+ }
765
767
}
0 commit comments