Download tests/PHPUnit/System/SpecialDateParamsTest.php from Leon4gr45/matomo: direct link, hf CLI and curl.
- Browser
- Download file 2.26 kB
-
https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/tests/PHPUnit/System/SpecialDateParamsTest.php
- Command line
-
hf download hf://spaces/Leon4gr45/matomo/tests/PHPUnit/System/SpecialDateParamsTest.php
-
curl -L -o SpecialDateParamsTest.php https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/tests/PHPUnit/System/SpecialDateParamsTest.php
2.26 kB
| /** | |
| * Matomo - free/libre analytics platform | |
| * | |
| * @link https://matomo.org | |
| * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later | |
| */ | |
| namespace Piwik\Tests\System; | |
| use Piwik\Tests\Fixtures\VisitsInCurrentYear; | |
| use Piwik\Tests\Framework\TestCase\SystemTestCase; | |
| /** | |
| * @group SpecialDateParams | |
| * @group Core | |
| */ | |
| class SpecialDateParamsTest extends SystemTestCase | |
| { | |
| public static $fixture = null; // initialized below class definition | |
| /** | |
| * @dataProvider getApiForTesting | |
| */ | |
| public function testApi($api, $params) | |
| { | |
| $this->runApiTests($api, $params); | |
| } | |
| public function getApiForTesting() | |
| { | |
| return [ | |
| [ | |
| ['VisitsSummary.getVisits', 'Actions.getPageTitles'], | |
| [ | |
| 'idSite' => self::$fixture->idSite, | |
| 'date' => 'last week', | |
| 'periods' => ['day'], | |
| 'testSuffix' => '_lastweek', | |
| ], | |
| ], | |
| [ | |
| ['VisitsSummary.getVisits', 'Actions.getPageTitles'], | |
| [ | |
| 'idSite' => self::$fixture->idSite, | |
| 'date' => 'last month', | |
| 'periods' => ['day'], | |
| 'testSuffix' => '_lastmonth', | |
| ], | |
| ], | |
| [ | |
| ['VisitsSummary.getVisits', 'Actions.getPageTitles'], | |
| [ | |
| 'idSite' => self::$fixture->idSite, | |
| 'date' => 'lastyear', | |
| 'periods' => ['day'], | |
| 'testSuffix' => '_lastyear', | |
| ], | |
| ], | |
| [ | |
| ['VisitsSummary.getVisits', 'Actions.getPageTitles'], | |
| [ | |
| 'idSite' => self::$fixture->idSite, | |
| 'date' => 'last-year,lastWeek', | |
| 'periods' => ['range'], | |
| 'testSuffix' => '_range', | |
| ], | |
| ], | |
| ]; | |
| } | |
| public static function getOutputPrefix() | |
| { | |
| return 'specialDateParams'; | |
| } | |
| } | |
| SpecialDateParamsTest::$fixture = new VisitsInCurrentYear(); | |