@@ -54,6 +54,11 @@ class StorageTest extends TestCase
5454 */
5555 private $ imagesStorage ;
5656
57+ /**
58+ * @var Storage
59+ */
60+ private $ imagesStorageWithZeroHeight ;
61+
5762 /**
5863 * @var MockObject
5964 */
@@ -294,7 +299,7 @@ function ($path) {
294299
295300 $ this ->imagesStorage = $ this ->objectManagerHelper ->getObject (
296301 Storage::class,
297- $ this ->getStorageClass (100 , 50 , $ allowedExtensions )
302+ $ this ->getStorageClass (100 , 50 , $ allowedExtensions )
298303 );
299304
300305 $ this ->imagesStorageWithZeroHeight = $ this ->objectManagerHelper ->getObject (
@@ -711,7 +716,6 @@ public function testResizeFileWithZeroHeight()
711716 ->method ('fileGetContents ' )
712717 ->willReturn ('some content ' );
713718
714-
715719 $ image = $ this ->getMockBuilder (image::class)
716720 ->disableOriginalConstructor ()
717721 ->addMethods (['open ' , 'keepAspectRatio ' ])
@@ -721,8 +725,6 @@ public function testResizeFileWithZeroHeight()
721725 $ image ->expects ($ this ->any ())->method ('keepAspectRatio ' )->with (true );
722726 $ image ->expects ($ this ->once ())->method ('resize ' )->with (100 , 0 )
723727 ->willThrowException (new \LogicException ($ exceptionMessage ));
724-
725-
726728 $ this ->adapterFactoryMock ->expects ($ this ->atLeastOnce ())->method ('create ' )->willReturn ($ image );
727729
728730 // Logger should not log any critical errors in this scenario
@@ -761,5 +763,5 @@ public function getStorageClass($width, $height, $allowedExtensions)
761763 'coreConfig ' => $ this ->coreConfigMock ,
762764 'logger ' => $ this ->loggerMock
763765 ];
764- }
766+ }
765767}
0 commit comments