diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-11-28 13:36:19 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-11-28 13:36:19 +0400 |
commit | 5b6c24b9488fff87ae9c304ac35394b7c501130d (patch) | |
tree | 74c58084938b82bc9d1b7c80394c9439f5b4d65e /plugins/ExamplePlugin/tests | |
parent | c31605d68dbf1114737f9b02bede8334a021bf8b (diff) |
Committing SimpleIntegrationTest.php forgot earlier
Diffstat (limited to 'plugins/ExamplePlugin/tests')
-rw-r--r-- | plugins/ExamplePlugin/tests/SimpleIntegrationTest.php | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/plugins/ExamplePlugin/tests/SimpleIntegrationTest.php b/plugins/ExamplePlugin/tests/SimpleIntegrationTest.php new file mode 100644 index 0000000000..0bfc490685 --- /dev/null +++ b/plugins/ExamplePlugin/tests/SimpleIntegrationTest.php @@ -0,0 +1,63 @@ +<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +namespace Piwik\Plugins\ExamplePlugin\tests; +use Piwik\Plugins\ExamplePlugin\tests\fixtures\SimpleFixtureTrackFewVisits; + +/** + * @group ExamplePlugin + * @group SimpleIntegrationTest + * @group Plugins + */ +class SimpleIntegrationTest extends \IntegrationTestCase +{ + /** + * @var SimpleFixtureTrackFewVisits + */ + public static $fixture = null; // initialized below class definition + + /** + * @dataProvider getApiForTesting + * @group SimpleIntegrationTest + */ + 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__); + } + +} + +SimpleIntegrationTest::$fixture = new SimpleFixtureTrackFewVisits(); + |