@@ -545,9 +545,6 @@ public function cropDataProvider()
545
545
*/
546
546
public function testCreatePngFromString ($ pixel1 , $ expectedColor1 , $ pixel2 , $ expectedColor2 , $ adapterType )
547
547
{
548
- if (!function_exists ('imagettfbbox ' )) {
549
- $ this ->markTestSkipped ('Workaround for problem with imagettfbbox() function on Travis ' );
550
- }
551
548
$ adapter = $ this ->_getAdapter ($ adapterType );
552
549
553
550
/** @var \Magento\Framework\Filesystem\Directory\ReadFactory readFactory */
@@ -560,9 +557,11 @@ public function testCreatePngFromString($pixel1, $expectedColor1, $pixel2, $expe
560
557
$ adapter ->refreshImageDimensions ();
561
558
562
559
$ color1 = $ adapter ->getColorAt ($ pixel1 ['x ' ], $ pixel1 ['y ' ]);
560
+ unset($ color1 ['alpha ' ]);
563
561
$ this ->assertEquals ($ expectedColor1 , $ color1 );
564
562
565
563
$ color2 = $ adapter ->getColorAt ($ pixel2 ['x ' ], $ pixel2 ['y ' ]);
564
+ unset($ color2 ['alpha ' ]);
566
565
$ this ->assertEquals ($ expectedColor2 , $ color2 );
567
566
}
568
567
@@ -576,30 +575,30 @@ public function createPngFromStringDataProvider()
576
575
return [
577
576
[
578
577
['x ' => 5 , 'y ' => 8 ],
579
- 'expectedColor1 ' => ['red ' => 0 , 'green ' => 0 , 'blue ' => 0 , ' alpha ' => 0 ],
580
- ['x ' => 0 , 'y ' => 15 ],
581
- 'expectedColor2 ' => ['red ' => 255 , 'green ' => 255 , 'blue ' => 255 , ' alpha ' => 127 ],
578
+ 'expectedColor1 ' => ['red ' => 0 , 'green ' => 0 , 'blue ' => 0 ],
579
+ ['x ' => 0 , 'y ' => 14 ],
580
+ 'expectedColor2 ' => ['red ' => 255 , 'green ' => 255 , 'blue ' => 255 ],
582
581
\Magento \Framework \Image \Adapter \AdapterInterface::ADAPTER_GD2 ,
583
582
],
584
583
[
585
- ['x ' => 4 , 'y ' => 7 ],
586
- 'expectedColor1 ' => ['red ' => 0 , 'green ' => 0 , 'blue ' => 0 , ' alpha ' => 0 ],
587
- ['x ' => 0 , 'y ' => 15 ],
588
- 'expectedColor2 ' => ['red ' => 255 , 'green ' => 255 , 'blue ' => 255 , ' alpha ' => 127 ],
584
+ ['x ' => 5 , 'y ' => 12 ],
585
+ 'expectedColor1 ' => ['red ' => 0 , 'green ' => 0 , 'blue ' => 0 ],
586
+ ['x ' => 0 , 'y ' => 20 ],
587
+ 'expectedColor2 ' => ['red ' => 255 , 'green ' => 255 , 'blue ' => 255 ],
589
588
\Magento \Framework \Image \Adapter \AdapterInterface::ADAPTER_IM
590
589
],
591
590
[
592
591
['x ' => 1 , 'y ' => 14 ],
593
- 'expectedColor1 ' => ['red ' => 255 , 'green ' => 255 , 'blue ' => 255 , ' alpha ' => 127 ],
592
+ 'expectedColor1 ' => ['red ' => 255 , 'green ' => 255 , 'blue ' => 255 ],
594
593
['x ' => 5 , 'y ' => 12 ],
595
- 'expectedColor2 ' => ['red ' => 0 , 'green ' => 0 , 'blue ' => 0 , ' alpha ' => 0 ],
594
+ 'expectedColor2 ' => ['red ' => 0 , 'green ' => 0 , 'blue ' => 0 ],
596
595
\Magento \Framework \Image \Adapter \AdapterInterface::ADAPTER_GD2
597
596
],
598
597
[
599
- ['x ' => 1 , 'y ' => 14 ],
600
- 'expectedColor1 ' => ['red ' => 255 , 'green ' => 255 , 'blue ' => 255 , ' alpha ' => 127 ],
601
- ['x ' => 4 , 'y ' => 10 ],
602
- 'expectedColor2 ' => ['red ' => 0 , 'green ' => 0 , 'blue ' => 0 , ' alpha ' => 0 ],
598
+ ['x ' => 1 , 'y ' => 20 ],
599
+ 'expectedColor1 ' => ['red ' => 255 , 'green ' => 255 , 'blue ' => 255 ],
600
+ ['x ' => 5 , 'y ' => 16 ],
601
+ 'expectedColor2 ' => ['red ' => 0 , 'green ' => 0 , 'blue ' => 0 ],
603
602
\Magento \Framework \Image \Adapter \AdapterInterface::ADAPTER_IM
604
603
]
605
604
];
0 commit comments