@@ -108,17 +108,18 @@ protected function _isFormatSupported($image, $adapter)
108
108
* Mark test as skipped if not
109
109
*
110
110
* @param string $adapterType
111
- * @return \Magento\Framework\Image\Adapter\AdapterInterface
111
+ * @return \Magento\Framework\Image\Adapter\AdapterInterface|null
112
112
*/
113
113
protected function _getAdapter ($ adapterType )
114
114
{
115
+ $ adapter = null ;
115
116
try {
116
117
$ objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
117
118
$ adapter = $ objectManager ->get (\Magento \Framework \Image \AdapterFactory::class)->create ($ adapterType );
118
- return $ adapter ;
119
119
} catch (\Exception $ e ) {
120
120
$ this ->markTestSkipped ($ e ->getMessage ());
121
121
}
122
+ return $ adapter ;
122
123
}
123
124
124
125
/**
@@ -667,7 +668,7 @@ public function createPngFromStringDataProvider()
667
668
[
668
669
['x ' => 5 , 'y ' => 8 ],
669
670
'expectedColor1 ' => ['red ' => 0 , 'green ' => 0 , 'blue ' => 0 ],
670
- ['x ' => 0 , 'y ' => 14 ],
671
+ ['x ' => 0 , 'y ' => 11 ],
671
672
'expectedColor2 ' => ['red ' => 255 , 'green ' => 255 , 'blue ' => 255 ],
672
673
\Magento \Framework \Image \Adapter \AdapterInterface::ADAPTER_GD2 ,
673
674
],
@@ -679,9 +680,9 @@ public function createPngFromStringDataProvider()
679
680
\Magento \Framework \Image \Adapter \AdapterInterface::ADAPTER_IM
680
681
],
681
682
[
682
- ['x ' => 1 , 'y ' => 14 ],
683
+ ['x ' => 1 , 'y ' => 11 ],
683
684
'expectedColor1 ' => ['red ' => 255 , 'green ' => 255 , 'blue ' => 255 ],
684
- ['x ' => 5 , 'y ' => 12 ],
685
+ ['x ' => 5 , 'y ' => 11 ],
685
686
'expectedColor2 ' => ['red ' => 0 , 'green ' => 0 , 'blue ' => 0 ],
686
687
\Magento \Framework \Image \Adapter \AdapterInterface::ADAPTER_GD2
687
688
],
0 commit comments