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:
authorThomas Steur <thomas.steur@googlemail.com>2014-10-06 06:41:13 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-10-06 06:41:13 +0400
commit8aaa1aba44e541ca260de505a3e98996b98c9f37 (patch)
treea72fca923e494a0f2e41947c13c73e9177b78bad /plugins/ExamplePlugin/tests
parent5a1eab97f54b44f57356b4276b9c9df2a8eef51b (diff)
refs #5940 splitting plugin tests folder into unit, integration and system for now
Diffstat (limited to 'plugins/ExamplePlugin/tests')
-rw-r--r--plugins/ExamplePlugin/tests/Fixtures/SimpleFixtureTrackFewVisits.php (renamed from plugins/ExamplePlugin/tests/fixtures/SimpleFixtureTrackFewVisits.php)2
-rw-r--r--plugins/ExamplePlugin/tests/Integration/SimpleTest.php24
-rw-r--r--plugins/ExamplePlugin/tests/System/SimpleSystemTest.php (renamed from plugins/ExamplePlugin/tests/SimpleSystemTest.php)2
-rw-r--r--plugins/ExamplePlugin/tests/System/expected/test___API.get_day.xml (renamed from plugins/ExamplePlugin/tests/expected/test___API.get_day.xml)0
-rw-r--r--plugins/ExamplePlugin/tests/System/expected/test___Goals.getItemsSku_day.xml (renamed from plugins/ExamplePlugin/tests/expected/test___Goals.getItemsSku_day.xml)0
-rw-r--r--plugins/ExamplePlugin/tests/System/processed/.gitkeep (renamed from plugins/ExamplePlugin/tests/processed/.gitkeep)0
-rw-r--r--plugins/ExamplePlugin/tests/System/processed/test___API.get_day.xml30
-rw-r--r--plugins/ExamplePlugin/tests/System/processed/test___Goals.getItemsSku_day.xml12
-rw-r--r--plugins/ExamplePlugin/tests/Unit/SimpleTest.php (renamed from plugins/ExamplePlugin/tests/SimpleTest.php)2
9 files changed, 69 insertions, 3 deletions
diff --git a/plugins/ExamplePlugin/tests/fixtures/SimpleFixtureTrackFewVisits.php b/plugins/ExamplePlugin/tests/Fixtures/SimpleFixtureTrackFewVisits.php
index ea9755f6a1..2d455ce70a 100644
--- a/plugins/ExamplePlugin/tests/fixtures/SimpleFixtureTrackFewVisits.php
+++ b/plugins/ExamplePlugin/tests/Fixtures/SimpleFixtureTrackFewVisits.php
@@ -5,7 +5,7 @@
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\ExamplePlugin\tests\fixtures;
+namespace Piwik\Plugins\ExamplePlugin\tests\Fixtures;
use Piwik\Date;
use Piwik\Tests\Fixture;
diff --git a/plugins/ExamplePlugin/tests/Integration/SimpleTest.php b/plugins/ExamplePlugin/tests/Integration/SimpleTest.php
new file mode 100644
index 0000000000..c096b2946b
--- /dev/null
+++ b/plugins/ExamplePlugin/tests/Integration/SimpleTest.php
@@ -0,0 +1,24 @@
+<?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\Integration;
+
+/**
+ * @group ExamplePlugin
+ * @group SimpleTest
+ * @group Plugins
+ */
+class SimpleTest extends \IntegrationTestCase
+{
+
+ public function testSimpleAddition()
+ {
+ $this->assertEquals(2, 1+1);
+ }
+
+}
diff --git a/plugins/ExamplePlugin/tests/SimpleSystemTest.php b/plugins/ExamplePlugin/tests/System/SimpleSystemTest.php
index ec36ab8e31..574e6b5a79 100644
--- a/plugins/ExamplePlugin/tests/SimpleSystemTest.php
+++ b/plugins/ExamplePlugin/tests/System/SimpleSystemTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\ExamplePlugin\tests;
+namespace Piwik\Plugins\ExamplePlugin\tests\System;
use Piwik\Plugins\ExamplePlugin\tests\fixtures\SimpleFixtureTrackFewVisits;
use Piwik\Tests\SystemTestCase;
diff --git a/plugins/ExamplePlugin/tests/expected/test___API.get_day.xml b/plugins/ExamplePlugin/tests/System/expected/test___API.get_day.xml
index 58296797c0..58296797c0 100644
--- a/plugins/ExamplePlugin/tests/expected/test___API.get_day.xml
+++ b/plugins/ExamplePlugin/tests/System/expected/test___API.get_day.xml
diff --git a/plugins/ExamplePlugin/tests/expected/test___Goals.getItemsSku_day.xml b/plugins/ExamplePlugin/tests/System/expected/test___Goals.getItemsSku_day.xml
index ba820ed649..ba820ed649 100644
--- a/plugins/ExamplePlugin/tests/expected/test___Goals.getItemsSku_day.xml
+++ b/plugins/ExamplePlugin/tests/System/expected/test___Goals.getItemsSku_day.xml
diff --git a/plugins/ExamplePlugin/tests/processed/.gitkeep b/plugins/ExamplePlugin/tests/System/processed/.gitkeep
index e69de29bb2..e69de29bb2 100644
--- a/plugins/ExamplePlugin/tests/processed/.gitkeep
+++ b/plugins/ExamplePlugin/tests/System/processed/.gitkeep
diff --git a/plugins/ExamplePlugin/tests/System/processed/test___API.get_day.xml b/plugins/ExamplePlugin/tests/System/processed/test___API.get_day.xml
new file mode 100644
index 0000000000..1cfef75f4b
--- /dev/null
+++ b/plugins/ExamplePlugin/tests/System/processed/test___API.get_day.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <nb_uniq_visitors>2</nb_uniq_visitors>
+ <nb_visits>2</nb_visits>
+ <nb_users>0</nb_users>
+ <nb_actions>4</nb_actions>
+ <max_actions>2</max_actions>
+ <bounce_rate>0%</bounce_rate>
+ <nb_actions_per_visit>2</nb_actions_per_visit>
+ <avg_time_on_site>632</avg_time_on_site>
+ <nb_visits_returning>0</nb_visits_returning>
+ <nb_actions_returning>0</nb_actions_returning>
+ <nb_uniq_visitors_returning>0</nb_uniq_visitors_returning>
+ <bounce_rate_returning>0%</bounce_rate_returning>
+ <nb_actions_per_visit_returning>0</nb_actions_per_visit_returning>
+ <avg_time_on_site_returning>0</avg_time_on_site_returning>
+ <nb_conversions>1</nb_conversions>
+ <nb_visits_converted>1</nb_visits_converted>
+ <conversion_rate>50</conversion_rate>
+ <revenue>2541</revenue>
+ <nb_pageviews>3</nb_pageviews>
+ <nb_uniq_pageviews>3</nb_uniq_pageviews>
+ <nb_downloads>0</nb_downloads>
+ <nb_uniq_downloads>0</nb_uniq_downloads>
+ <nb_outlinks>0</nb_outlinks>
+ <nb_uniq_outlinks>0</nb_uniq_outlinks>
+ <nb_searches>1</nb_searches>
+ <nb_keywords>1</nb_keywords>
+ <avg_time_generation>0</avg_time_generation>
+</result> \ No newline at end of file
diff --git a/plugins/ExamplePlugin/tests/System/processed/test___Goals.getItemsSku_day.xml b/plugins/ExamplePlugin/tests/System/processed/test___Goals.getItemsSku_day.xml
new file mode 100644
index 0000000000..ba820ed649
--- /dev/null
+++ b/plugins/ExamplePlugin/tests/System/processed/test___Goals.getItemsSku_day.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>SKU_ID</label>
+ <revenue>25641</revenue>
+ <quantity>33</quantity>
+ <orders>1</orders>
+ <avg_price>777</avg_price>
+ <avg_quantity>33</avg_quantity>
+ <conversion_rate>0%</conversion_rate>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/ExamplePlugin/tests/SimpleTest.php b/plugins/ExamplePlugin/tests/Unit/SimpleTest.php
index 0fdc86062c..396ee20785 100644
--- a/plugins/ExamplePlugin/tests/SimpleTest.php
+++ b/plugins/ExamplePlugin/tests/Unit/SimpleTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\ExamplePlugin\tests;
+namespace Piwik\Plugins\ExamplePlugin\tests\Unit;
/**
* @group ExamplePlugin