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/IntranetMeasurable/tests/System/TrackingTest.php')
-rw-r--r--plugins/IntranetMeasurable/tests/System/TrackingTest.php73
1 files changed, 73 insertions, 0 deletions
diff --git a/plugins/IntranetMeasurable/tests/System/TrackingTest.php b/plugins/IntranetMeasurable/tests/System/TrackingTest.php
new file mode 100644
index 0000000000..e8f0a5680f
--- /dev/null
+++ b/plugins/IntranetMeasurable/tests/System/TrackingTest.php
@@ -0,0 +1,73 @@
+<?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\IntranetMeasurable\tests\System;
+
+use Piwik\Plugins\IntranetMeasurable\tests\Fixtures\IntranetSitesWithVisits;
+use Piwik\Tests\Framework\TestCase\SystemTestCase;
+
+/**
+ * @group IntranetMeasurable
+ * @group TrackingTest
+ * @group Plugins
+ */
+class TrackingTest extends SystemTestCase
+{
+ /**
+ * @var IntranetSitesWithVisits
+ */
+ public static $fixture = null; // initialized below class definition
+
+ /**
+ * @dataProvider getApiForTesting
+ */
+ public function testApi($api, $params)
+ {
+ $this->runApiTests($api, $params);
+ }
+
+ public function getApiForTesting()
+ {
+ $api = array(
+ 'API.get',
+ );
+
+ $apiToTest = array();
+ $apiToTest[] = array($api,
+ array(
+ 'idSite' => self::$fixture->idSite,
+ 'date' => self::$fixture->dateTime,
+ 'periods' => array('day'),
+ 'testSuffix' => '_intranet'
+ )
+ );
+ $apiToTest[] = array($api,
+ array(
+ 'idSite' => self::$fixture->idSiteNotIntranet,
+ 'date' => self::$fixture->dateTime,
+ 'periods' => array('day'),
+ 'testSuffix' => '_notIntranet'
+ )
+ );
+
+ return $apiToTest;
+ }
+
+ public static function getOutputPrefix()
+ {
+ return '';
+ }
+
+ public static function getPathToTestDirectory()
+ {
+ return dirname(__FILE__);
+ }
+
+}
+
+TrackingTest::$fixture = new IntranetSitesWithVisits(); \ No newline at end of file