From b6ace0e06c2ef3f8f98ac55feb934ebe0d304107 Mon Sep 17 00:00:00 2001 From: Stefan Giehl Date: Sun, 17 May 2020 22:39:32 +0200 Subject: Use utf8mb4 character set if possible (#15618) --- tests/PHPUnit/System/BackwardsCompatibility1XTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tests/PHPUnit/System/BackwardsCompatibility1XTest.php') diff --git a/tests/PHPUnit/System/BackwardsCompatibility1XTest.php b/tests/PHPUnit/System/BackwardsCompatibility1XTest.php index 30b1489bfb..e2157ac3a9 100644 --- a/tests/PHPUnit/System/BackwardsCompatibility1XTest.php +++ b/tests/PHPUnit/System/BackwardsCompatibility1XTest.php @@ -9,6 +9,7 @@ namespace Piwik\Tests\System; use Piwik\Common; use Piwik\Db; +use Piwik\Plugin\Manager; use Piwik\Plugins\VisitFrequency\API as VisitFrequencyApi; use Piwik\Tests\Framework\TestCase\SystemTestCase; use Piwik\Tests\Fixtures\SqlDump; @@ -24,15 +25,19 @@ class BackwardsCompatibility1XTest extends SystemTestCase { const FIXTURE_LOCATION = '/tests/resources/piwik-1.13-dump.sql'; + /** @var SqlDump $fixture */ public static $fixture = null; // initialized below class public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); - // note: not sure why I have to manually install plugin - \Piwik\Plugin\Manager::getInstance()->loadPlugin('CustomAlerts')->install(); - \Piwik\Plugin\Manager::getInstance()->loadPlugin('CustomDimensions')->install(); + $installedPlugins = Manager::getInstance()->getInstalledPluginsName(); + + // ensure all plugins are installed correctly (some plugins database tables would be missing otherwise) + foreach ($installedPlugins as $installedPlugin) { + \Piwik\Plugin\Manager::getInstance()->loadPlugin($installedPlugin)->install(); + } $result = Fixture::updateDatabase(); if ($result === false) { -- cgit v1.2.3