diff options
Diffstat (limited to 'plugins/CustomVariables/tests/System/CustomVariablesSystemTest.php')
-rw-r--r-- | plugins/CustomVariables/tests/System/CustomVariablesSystemTest.php | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/plugins/CustomVariables/tests/System/CustomVariablesSystemTest.php b/plugins/CustomVariables/tests/System/CustomVariablesSystemTest.php new file mode 100644 index 0000000000..1bcdf9f838 --- /dev/null +++ b/plugins/CustomVariables/tests/System/CustomVariablesSystemTest.php @@ -0,0 +1,60 @@ +<?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\CustomVariables\tests; + +use Piwik\Tests\SystemTestCase; + +/** + * @group CustomVariables + * @group CustomVariablesSystemTest + * @group Plugins + */ +class CustomVariablesSystemTest extends SystemTestCase +{ + /** + * @var Fixtures\VisitWithManyCustomVariables + */ + public static $fixture = null; // initialized below class definition + + public static function getOutputPrefix() + { + return 'CustomVariablesSystemTest'; + } + + /** + * @dataProvider getApiForTesting + */ + public function testApi($api, $params) + { + $this->runApiTests($api, $params); + } + + public function getApiForTesting() + { + $apiToCall = array('CustomVariables.getCustomVariables', 'Live.getLastVisitsDetails'); + + return array( + array($apiToCall, array( + 'idSite' => self::$fixture->idSite, + 'date' => self::$fixture->dateTime, + 'periods' => array('day')) + ) + ); + } + + /** + * Path where expected/processed output files are stored. + */ + public static function getPathToTestDirectory() + { + return __DIR__; + } +} + +CustomVariablesSystemTest::$fixture = new Fixtures\VisitWithManyCustomVariables();
\ No newline at end of file |