Skip to content

Commit eb59db5

Browse files
author
Joan He
committed
MAGETWO-89260: Fix Travis build issues
- fix integration tests and static test
1 parent 76969b8 commit eb59db5

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Bootstrap/EnvironmentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ public function testEmulateSession()
7777
$this->assertSame($sessionVars, $this->_getSessionVars(), 'Super-global $_SESSION must not be affected.');
7878
$this->assertNotEmpty(session_id(), 'Global session identified has to be emulated.');
7979
}
80-
}
80+
}

dev/tests/integration/testsuite/Magento/Framework/Session/SaveHandlerTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
use Magento\Framework\App\DeploymentConfig;
99
use Magento\Framework\Session\Config\ConfigInterface;
10-
use Magento\Framework\Session\SaveHandler;
1110
use Magento\Framework\App\ObjectManager;
1211

1312
class SaveHandlerTest extends \PHPUnit\Framework\TestCase
@@ -55,10 +54,6 @@ public function testSetSaveHandler($deploymentConfigHandler, $iniHandler)
5554
$expected,
5655
ObjectManager::getInstance()->get(ConfigInterface::class)->getOption('session.save_handler')
5756
);
58-
59-
if ($iniHandler && isset($this->originalSaveHandler) && $iniHandler != $this->originalSaveHandler) {
60-
ini_set('session.save_handler', $this->originalSaveHandler);
61-
}
6257
}
6358

6459
public function saveHandlerProvider()

lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,12 @@ public function getImageType()
301301
if ($this->_fileType) {
302302
return $this->_fileType;
303303
} else {
304-
list($this->_imageSrcWidth, $this->_imageSrcHeight, $this->_fileType) = getimagesize($this->_fileName);
305-
return $this->_fileType;
304+
if ($this->_canProcess()) {
305+
list($this->_imageSrcWidth, $this->_imageSrcHeight, $this->_fileType) = getimagesize($this->_fileName);
306+
return $this->_fileType;
307+
}
306308
}
309+
return null;
307310
}
308311

309312
/**

lib/internal/Magento/Framework/Session/SaveHandler.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
use Magento\Framework\App\DeploymentConfig;
99
use Magento\Framework\App\ObjectManager;
10-
use Magento\Framework\Exception\SessionException;
1110
use Magento\Framework\Session\Config\ConfigInterface;
1211

1312
/**
@@ -53,7 +52,7 @@ public function __construct(
5352

5453
try {
5554
$connection = $saveHandlerFactory->create($saveMethod);
56-
} catch (SessionException $e) {
55+
} catch (\LogicException $e) {
5756
$connection = $saveHandlerFactory->create($default);
5857
$this->setSaveHandler($default);
5958
}

0 commit comments

Comments
 (0)