18 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
32 'Get image scale for a width of 150px' => [
49 'Get image scale with a maximum width of 100px' => [
68 'Get image scale with a minimum width of 200px' => [
87 'No PHP warning for zero in input dimensions when scaling' => [
111 $this->assertEquals($result, $expected);
119 $file =
'myImageFile.png';
128 $subject = $this->getAccessibleMock(GraphicalFunctions::class, [
'executeIdentifyCommandForImageFile'], [],
'',
false);
129 $subject->_set(
'processorEnabled',
true);
130 $subject->expects($this->once())->method(
'executeIdentifyCommandForImageFile')->with($file)->willReturn(
'123 234 png PNG');
131 $result = $subject->imageMagickIdentify($file);
132 $this->assertEquals($result, $expected);
140 $file =
'myImageFile.png';
149 $subject = $this->getAccessibleMock(GraphicalFunctions::class, [
'executeIdentifyCommandForImageFile'], [],
'',
false);
150 $subject->_set(
'processorEnabled',
true);
151 $subject->expects($this->once())->method(
'executeIdentifyCommandForImageFile')->with($file)->willReturn(
'200+0+0 400+0+0 png PNG');
152 $result = $subject->imageMagickIdentify($file);
153 $this->assertEquals($result, $expected);