diff options
author | diosmosis <benaka@piwik.pro> | 2015-03-17 03:53:49 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-03-17 03:53:49 +0300 |
commit | f68c136917a0c976d4c8d8642a661009361013a1 (patch) | |
tree | 1b5b42da0c8108c87fff17038d9d24df9059bad9 | |
parent | f087215fbe005e8185bba987d4f306277c88e505 (diff) |
Fixing travis build (hopefully).
-rw-r--r-- | core/Updates/2.10.0-b5.php | 12 | ||||
-rw-r--r-- | plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php | 6 |
2 files changed, 11 insertions, 7 deletions
diff --git a/core/Updates/2.10.0-b5.php b/core/Updates/2.10.0-b5.php index 1cbcb0e353..51663a9d0a 100644 --- a/core/Updates/2.10.0-b5.php +++ b/core/Updates/2.10.0-b5.php @@ -42,6 +42,7 @@ use Piwik\Plugins\Dashboard\Model AS DashboardModel; */ class Updates_2_10_0_b5 extends Updates { + public static $archiveBlobTables; static function getSql() { @@ -120,21 +121,18 @@ class Updates_2_10_0_b5 extends Updates */ public static function getAllArchiveBlobTables() { - static $archiveBlobTables; - - if (empty($archiveBlobTables)) { - + if (empty(self::$archiveBlobTables)) { $archiveTables = ArchiveTableCreator::getTablesArchivesInstalled(); - $archiveBlobTables = array_filter($archiveTables, function($name) { + self::$archiveBlobTables = array_filter($archiveTables, function($name) { return ArchiveTableCreator::getTypeFromTableName($name) == ArchiveTableCreator::BLOB_TABLE; }); // sort tables so we have them in order of their date - rsort($archiveBlobTables); + rsort(self::$archiveBlobTables); } - return (array) $archiveBlobTables; + return (array) self::$archiveBlobTables; } /** diff --git a/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php b/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php index bbcd236cb2..a3c97d86d8 100644 --- a/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php +++ b/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php @@ -12,11 +12,15 @@ use Piwik\Config; use Piwik\DataAccess\ArchiveTableCreator; use Piwik\Date; use Piwik\Db; +use Piwik\DbHelper; use Piwik\Option; use Piwik\Tests\Framework\TestCase\ConsoleCommandTestCase; +use Piwik\Updates\Updates_2_10_0_b5; use Piwik\Version; use Symfony\Component\Console\Helper\QuestionHelper; +require_once PIWIK_INCLUDE_PATH . '/core/Updates/2.10.0-b5.php'; + /** * @group CoreUpdater * @group CoreUpdater_Integration @@ -39,6 +43,8 @@ class UpdateTest extends ConsoleCommandTestCase $_SERVER['SCRIPT_NAME'] = $_SERVER['SCRIPT_NAME'] . " console"; // update won't execute w/o this, see Common::isRunningConsoleCommand() ArchiveTableCreator::clear(); + DbHelper::getTablesInstalled($forceReload = true); // force reload so internal cache in Mysql.php is refreshed + Updates_2_10_0_b5::$archiveBlobTables = null; } public function tearDown() |