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/ExamplePlugin/tests/System/SimpleSystemTest.php')
-rw-r--r--plugins/ExamplePlugin/tests/System/SimpleSystemTest.php66
1 files changed, 66 insertions, 0 deletions
diff --git a/plugins/ExamplePlugin/tests/System/SimpleSystemTest.php b/plugins/ExamplePlugin/tests/System/SimpleSystemTest.php
new file mode 100644
index 0000000000..574e6b5a79
--- /dev/null
+++ b/plugins/ExamplePlugin/tests/System/SimpleSystemTest.php
@@ -0,0 +1,66 @@
+<?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\ExamplePlugin\tests\System;
+
+use Piwik\Plugins\ExamplePlugin\tests\fixtures\SimpleFixtureTrackFewVisits;
+use Piwik\Tests\SystemTestCase;
+
+/**
+ * @group ExamplePlugin
+ * @group SimpleSystemTest
+ * @group Plugins
+ */
+class SimpleSystemTest extends SystemTestCase
+{
+ /**
+ * @var SimpleFixtureTrackFewVisits
+ */
+ 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',
+ 'Goals.getItemsSku'
+ );
+
+ $apiToTest = array();
+ $apiToTest[] = array($api,
+ array(
+ 'idSite' => 1,
+ 'date' => self::$fixture->dateTime,
+ 'periods' => array('day'),
+ 'testSuffix' => ''
+ )
+ );
+
+ return $apiToTest;
+ }
+
+ public static function getOutputPrefix()
+ {
+ return '';
+ }
+
+ public static function getPathToTestDirectory()
+ {
+ return dirname(__FILE__);
+ }
+
+}
+
+SimpleSystemTest::$fixture = new SimpleFixtureTrackFewVisits(); \ No newline at end of file