@@ -76,27 +76,27 @@ class ImageTest extends AbstractFormTestCase
76
76
private $ fileProcessorFactoryMock ;
77
77
78
78
/**
79
- * @var File|PHPUnit_Framework_MockObject_MockObject
79
+ * @var File|\PHPUnit\Framework\MockObject\MockObject
80
80
*/
81
81
private $ ioFileSystemMock ;
82
82
83
83
/**
84
- * @var DirectoryList|PHPUnit_Framework_MockObject_MockObject
84
+ * @var DirectoryList|\PHPUnit\Framework\MockObject\MockObject
85
85
*/
86
86
private $ directoryListMock ;
87
87
88
88
/**
89
- * @var WriteFactory|PHPUnit_Framework_MockObject_MockObject
89
+ * @var WriteFactory|\PHPUnit\Framework\MockObject\MockObject
90
90
*/
91
91
private $ writeFactoryMock ;
92
92
93
93
/**
94
- * @var Write|PHPUnit_Framework_MockObject_MockObject
94
+ * @var Write|\PHPUnit\Framework\MockObject\MockObject
95
95
*/
96
96
private $ mediaEntityTmpDirectoryMock ;
97
97
98
98
/**
99
- * @var Driver|PHPUnit_Framework_MockObject_MockObject
99
+ * @var Driver|\PHPUnit\Framework\MockObject\MockObject
100
100
*/
101
101
private $ driverMock ;
102
102
@@ -251,6 +251,14 @@ public function testValidate()
251
251
->with (FileProcessor::TMP_DIR . '/ ' . $ value ['name ' ])
252
252
->willReturn (true );
253
253
254
+ $ this ->ioFileSystemMock ->expects ($ this ->any ())
255
+ ->method ('getPathInfo ' )
256
+ ->with ($ value ['name ' ])
257
+ ->willReturn ([
258
+ 'extension ' => 'gif ' ,
259
+ 'filename ' => 'logo '
260
+ ]);
261
+
254
262
$ model = $ this ->initialize ([
255
263
'value ' => $ value ,
256
264
'isAjax ' => false ,
@@ -304,6 +312,14 @@ public function testValidateMaxFileSize()
304
312
->with (FileProcessor::TMP_DIR . '/ ' . $ value ['name ' ])
305
313
->willReturn (true );
306
314
315
+ $ this ->ioFileSystemMock ->expects ($ this ->any ())
316
+ ->method ('getPathInfo ' )
317
+ ->with ($ value ['name ' ])
318
+ ->willReturn ([
319
+ 'extension ' => 'gif ' ,
320
+ 'filename ' => 'logo '
321
+ ]);
322
+
307
323
$ model = $ this ->initialize ([
308
324
'value ' => $ value ,
309
325
'isAjax ' => false ,
@@ -356,6 +372,14 @@ public function testValidateMaxImageWidth()
356
372
->with (FileProcessor::TMP_DIR . '/ ' . $ value ['name ' ])
357
373
->willReturn (true );
358
374
375
+ $ this ->ioFileSystemMock ->expects ($ this ->any ())
376
+ ->method ('getPathInfo ' )
377
+ ->with ($ value ['name ' ])
378
+ ->willReturn ([
379
+ 'extension ' => 'gif ' ,
380
+ 'filename ' => 'logo '
381
+ ]);
382
+
359
383
$ model = $ this ->initialize ([
360
384
'value ' => $ value ,
361
385
'isAjax ' => false ,
@@ -408,6 +432,14 @@ public function testValidateMaxImageHeight()
408
432
->with (FileProcessor::TMP_DIR . '/ ' . $ value ['name ' ])
409
433
->willReturn (true );
410
434
435
+ $ this ->ioFileSystemMock ->expects ($ this ->any ())
436
+ ->method ('getPathInfo ' )
437
+ ->with ($ value ['name ' ])
438
+ ->willReturn ([
439
+ 'extension ' => 'gif ' ,
440
+ 'filename ' => 'logo '
441
+ ]);
442
+
411
443
$ model = $ this ->initialize ([
412
444
'value ' => $ value ,
413
445
'isAjax ' => false ,
0 commit comments