From ddb82b0f8b441ab1daa992db7ed7a10c4d0ac216 Mon Sep 17 00:00:00 2001 From: Vlad Veselov Date: Sat, 13 Dec 2014 22:45:25 -0500 Subject: [PATCH] Additional Travis CI builds fixes: fix mistake in .travis.yml which broke everything, fix trouble caused integration tests failures on PHP 5.5/5.6, speed up composer install by bot preferring source, eliminate notice due to empty config value passed to @magentoConfigFixture --- .travis.yml | 3 +-- app/code/Magento/Directory/Helper/Data.php | 4 +++- .../Magento/TestFramework/Annotation/ConfigFixture.php | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45287b64e5c76..dd261eb756799 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,8 +50,7 @@ before_script: # Change memory_limit for travis - echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - phpenv rehash; - - composer install --no-interaction --prefer-source --dev - - cd .. + - composer install --no-interaction --dev script: # Unit tests - sh -c "if [ '$TEST_SUITE' = 'unit' ]; then ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist; fi" diff --git a/app/code/Magento/Directory/Helper/Data.php b/app/code/Magento/Directory/Helper/Data.php index c584342db5c8d..17d96968a6e92 100644 --- a/app/code/Magento/Directory/Helper/Data.php +++ b/app/code/Magento/Directory/Helper/Data.php @@ -182,7 +182,9 @@ public function getRegionJson() ]; } $json = $this->_coreHelper->jsonEncode($regions); - + if ($json === false) { + $json = 'false'; + } $this->_configCacheType->save($json, $cacheKey); } $this->_regionJson = $json; diff --git a/dev/tests/integration/framework/Magento/TestFramework/Annotation/ConfigFixture.php b/dev/tests/integration/framework/Magento/TestFramework/Annotation/ConfigFixture.php index d1cf52c0ad8b6..f5bb55aa9639f 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Annotation/ConfigFixture.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Annotation/ConfigFixture.php @@ -102,7 +102,8 @@ protected function _assignConfigData(\PHPUnit_Framework_TestCase $test) if (preg_match('/^.+?(?=_store\s)/', $configPathAndValue, $matches)) { /* Store-scoped config value */ $storeCode = $matches[0] != 'current' ? $matches[0] : null; - list(, $configPath, $requiredValue) = preg_split('/\s+/', $configPathAndValue, 3); + $parts = preg_split('/\s+/', $configPathAndValue, 3); + list(, $configPath, $requiredValue) = $parts + ['', '', '']; $originalValue = $this->_getConfigValue($configPath, $storeCode); $this->_storeConfigValues[$storeCode][$configPath] = $originalValue; $this->_setConfigValue($configPath, $requiredValue, $storeCode);