@@ -116,7 +116,7 @@ protected function _getAdapter($adapterType)
116
116
{
117
117
try {
118
118
$ objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
119
- $ adapter = $ objectManager ->get (' Magento\Framework\Image\AdapterFactory ' )->create ($ adapterType );
119
+ $ adapter = $ objectManager ->get (\ Magento \Framework \Image \AdapterFactory::class )->create ($ adapterType );
120
120
return $ adapter ;
121
121
} catch (\Exception $ e ) {
122
122
$ this ->markTestSkipped ($ e ->getMessage ());
@@ -547,15 +547,15 @@ public function cropDataProvider()
547
547
*/
548
548
public function testCreatePngFromString ($ pixel1 , $ expectedColor1 , $ pixel2 , $ expectedColor2 , $ adapterType )
549
549
{
550
- if (!function_exists ('imagettfbbox ' )) {
551
- $ this ->markTestSkipped ('Workaround of problem with imagettfbbox function on Travis ' );
550
+ if (!function_exists ('imagettfbbox ' ) || ( getenv ( ' TRAVIS ' )) ) {
551
+ $ this ->markTestSkipped ('Workaround for problem with imagettfbbox() function on Travis ' );
552
552
}
553
553
554
554
$ adapter = $ this ->_getAdapter ($ adapterType );
555
555
556
556
/** @var \Magento\Framework\Filesystem\Directory\ReadFactory readFactory */
557
557
$ readFactory = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->get (
558
- ' Magento\Framework\Filesystem\Directory\ReadFactory '
558
+ \ Magento \Framework \Filesystem \Directory \ReadFactory::class
559
559
);
560
560
$ reader = $ readFactory ->create (BP );
561
561
$ path = $ reader ->getAbsolutePath ('lib/internal/LinLibertineFont/LinLibertine_Re-4.4.1.ttf ' );
@@ -611,7 +611,7 @@ public function createPngFromStringDataProvider()
611
611
public function testValidateUploadFile ()
612
612
{
613
613
$ objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
614
- $ imageAdapter = $ objectManager ->get (' Magento\Framework\Image\AdapterFactory ' )->create ();
614
+ $ imageAdapter = $ objectManager ->get (\ Magento \Framework \Image \AdapterFactory::class )->create ();
615
615
$ this ->assertTrue ($ imageAdapter ->validateUploadFile ($ this ->_getFixture ('magento_thumbnail.jpg ' )));
616
616
}
617
617
@@ -621,7 +621,7 @@ public function testValidateUploadFile()
621
621
public function testValidateUploadFileException ()
622
622
{
623
623
$ objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
624
- $ imageAdapter = $ objectManager ->get (' Magento\Framework\Image\AdapterFactory ' )->create ();
624
+ $ imageAdapter = $ objectManager ->get (\ Magento \Framework \Image \AdapterFactory::class )->create ();
625
625
$ imageAdapter ->validateUploadFile (__FILE__ );
626
626
}
627
627
}
0 commit comments