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/UserSettings/tests/System/GetLanguageSystemTest.php')
-rw-r--r--plugins/UserSettings/tests/System/GetLanguageSystemTest.php74
1 files changed, 74 insertions, 0 deletions
diff --git a/plugins/UserSettings/tests/System/GetLanguageSystemTest.php b/plugins/UserSettings/tests/System/GetLanguageSystemTest.php
new file mode 100644
index 0000000000..cb87f88d1f
--- /dev/null
+++ b/plugins/UserSettings/tests/System/GetLanguageSystemTest.php
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+namespace Piwik\Plugins\UserSettings\tests\System;
+
+
+use Piwik\Plugins\UserSettings\tests\Fixtures\LanguageFixture;
+use Piwik\Tests\SystemTestCase;
+
+/**
+ * Class GetLanguageSystemTest
+ * @package Piwik\Plugins\UserSettings\tests
+ * @group GetLanguageSystemTest
+ * @group Plugins
+ * @group UserSettings
+ */
+class GetLanguageSystemTest extends SystemTestCase {
+
+ public static $fixture = null;
+
+ public static function getOutputPrefix()
+ {
+ return '';
+ }
+
+ /**
+ * @param $api
+ * @param $params
+ * @dataProvider getApiForTesting
+ * @group GetLanguageSystemTest
+ */
+ public function testApi($api, $params)
+ {
+ $this->runApiTests($api, $params);
+ }
+
+ /**
+ * @return array
+ */
+ public function getApiForTesting()
+ {
+ $apiToCall = array(
+ "UserSettings.getLanguage",
+ "UserSettings.getLanguageCode"
+ );
+
+ $apiToTest = array();
+
+ $apiToTest[] = array(
+ $apiToCall,
+ array(
+ 'idSite' => self::$fixture->idSite,
+ 'date' => self::$fixture->dateTime,
+ 'periods' => array('day')
+ )
+ );
+
+ return $apiToTest;
+ }
+
+
+ public static function getPathToTestDirectory()
+ {
+ return dirname(__FILE__);
+ }
+
+}
+
+GetLanguageSystemTest::$fixture = new LanguageFixture(); \ No newline at end of file