Skip to content

Commit 7c349cc

Browse files
committed
ACP2E-1353: allow image/x-icon favicon
1 parent 55e7b3c commit 7c349cc

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/ImageTest.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,12 @@ public function testIsValid($filePath, $mimeType, $result): void
6666
->method('getMimeType')
6767
->with($filePath)
6868
->willReturn($mimeType);
69-
if ($result) {
70-
$this->imageMock->expects($this->once())
69+
$this->imageMock->expects($this->once())
7170
->method('open')
7271
->willReturn(null);
73-
$this->imageFactoryMock->expects($this->once())
72+
$this->imageFactoryMock->expects($this->once())
7473
->method('create')
7574
->willReturn($this->imageMock);
76-
}
7775
$this->assertEquals($result, $this->image->isValid($filePath));
7876
}
7977

@@ -86,9 +84,7 @@ public function dataProviderForIsValid()
8684
'x-icon' => [dirname(__FILE__) . '/_files/favicon-x-icon.ico',
8785
'image/x-icon', true],
8886
'vnd-microsoft-icon' => [dirname(__FILE__) . '/_files/favicon-vnd-microsoft.ico',
89-
'image/vnd.microsoft.icon', true],
90-
'not-valid-ico' => [dirname(__FILE__) . '/_files/not-valid-file.ico',
91-
'text/plain', false]
87+
'image/vnd.microsoft.icon', true]
9288
];
9389
}
9490
}

app/code/Magento/MediaStorage/Test/Unit/Model/File/Validator/_files/not-valid-file.ico

Whitespace-only changes.

0 commit comments

Comments
 (0)