Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SitesManager/tests/System/ApiTest.php')
-rw-r--r--plugins/SitesManager/tests/System/ApiTest.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/plugins/SitesManager/tests/System/ApiTest.php b/plugins/SitesManager/tests/System/ApiTest.php
index 393a8fc6a4..34f57a849c 100644
--- a/plugins/SitesManager/tests/System/ApiTest.php
+++ b/plugins/SitesManager/tests/System/ApiTest.php
@@ -8,6 +8,8 @@
namespace Piwik\Plugins\SitesManager\tests\System;
+use Piwik\Db\Schema\Mysql;
+use Piwik\Option;
use Piwik\Plugins\SitesManager\tests\Fixtures\ManySites;
use Piwik\Tests\Framework\TestCase\SystemTestCase;
@@ -68,6 +70,39 @@ class ApiTest extends SystemTestCase
return $apiToTest;
}
+ public function test_InstalledBeforeMatomo37()
+ {
+ $this->setInstallVersion('3.6.0');
+ $this->runApiTests(array('SitesManager.getJavascriptTag', 'SitesManager.getImageTrackingCode'), array(
+ 'idSite' => 1,
+ 'testSuffix' => '_prior3_7_0'
+ ));
+ }
+
+ public function test_InstalledBeforeMatomo37ButForced()
+ {
+ $this->setInstallVersion('3.6.0');
+ $this->runApiTests(array('SitesManager.getJavascriptTag', 'SitesManager.getImageTrackingCode'), array(
+ 'idSite' => 1,
+ 'otherRequestParameters' => array('forceMatomoEndpoint' => 1),
+ 'testSuffix' => '_prior3_7_0_but_forced'
+ ));
+ }
+
+ public function test_InstalledAfterMatomo37()
+ {
+ $this->setInstallVersion('3.7.0');
+ $this->runApiTests(array('SitesManager.getJavascriptTag', 'SitesManager.getImageTrackingCode'), array(
+ 'idSite' => 1,
+ 'testSuffix' => '_after3_7_0'
+ ));
+ }
+
+ private function setInstallVersion($installVersion)
+ {
+ Option::set(Mysql::OPTION_NAME_MATOMO_INSTALL_VERSION, $installVersion);
+ }
+
public static function getOutputPrefix()
{
return 'SitesManager';