@@ -204,7 +204,6 @@ protected function setUp(): void
204
204
->willReturnOnConsecutiveCalls ($ this ->testfilepath , $ this ->testImageHiddenfilepath );
205
205
$ this ->mediaDirectoryMock ->expects ($ this ->any ())
206
206
->method ('getRelativePath ' )
207
- ->willReturnOnConsecutiveCalls ($ this ->testfilepath , $ this ->testImageHiddenfilepath )
208
207
->willReturnOnConsecutiveCalls ($ this ->testfilepath , $ this ->testImageHiddenfilepath );
209
208
210
209
$ this ->viewMock ->expects ($ this ->any ())
@@ -418,13 +417,13 @@ public function testResizeFromImageNameMediaStorageDatabase()
418
417
->willReturn (false );
419
418
420
419
$ imageMock = $ this ->createMock (Image::class);
421
- $ this ->imageFactoryMock ->expects ($ this ->any ())
420
+ $ this ->imageFactoryMock ->expects ($ this ->once ())
422
421
->method ('create ' )
423
422
->willReturn ($ imageMock );
424
423
425
424
$ this ->mediaDirectoryMock ->expects ($ this ->any ())
426
425
->method ('isFile ' )
427
- ->withConsecutive ([ $ this ->testfilepath ], [ $ this -> testImageHiddenfilepath ] )
426
+ ->with ( $ this ->testfilepath )
428
427
->willReturnOnConsecutiveCalls (
429
428
$ this ->returnValue (false ),
430
429
$ this ->returnValue (true )
@@ -441,12 +440,12 @@ public function testResizeFromImageNameMediaStorageDatabase()
441
440
['0 ' => []]
442
441
);
443
442
444
- $ this ->databaseMock ->expects ($ this ->any ())
443
+ $ this ->databaseMock ->expects ($ this ->once ())
445
444
->method ('saveFileToFilesystem ' )
446
- ->withConsecutive ([ $ this ->testfilepath ], [ $ this -> testImageHiddenfilepath ] );
447
- $ this ->databaseMock ->expects ($ this ->any ())
445
+ ->with ( $ this ->testfilepath );
446
+ $ this ->databaseMock ->expects ($ this ->once ())
448
447
->method ('saveFile ' )
449
- ->withConsecutive ([ $ this ->testfilepath ], [ $ this -> testImageHiddenfilepath ] );
448
+ ->with ( $ this ->testfilepath );
450
449
451
450
$ this ->service ->resizeFromImageName ($ this ->testfilename );
452
451
}
@@ -489,7 +488,7 @@ public function testSkipResizingAlreadyResizedImageInDatabase()
489
488
490
489
$ this ->mediaDirectoryMock ->expects ($ this ->any ())
491
490
->method ('isFile ' )
492
- ->withConsecutive ([ $ this ->testfilepath ], [ $ this -> testImageHiddenfilepath ] )
491
+ ->with ( $ this ->testfilepath )
493
492
->willReturnOnConsecutiveCalls (
494
493
$ this ->returnValue (false ),
495
494
$ this ->returnValue (true )
0 commit comments