blob: 3027f5382fbfd0294162bb86b303a0ea37a99fd5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<?php
/**
* Piwik - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Tests\System;
use Piwik\Tests\Framework\TestCase\SystemTestCase;
use Piwik\Tests\Fixtures\InvalidVisits;
/**
* test the Yearly metadata API response,
* with no visits, with custom response language
*
* @group Plugins
* @group ApiGetReportMetadataYearTest
*/
class ApiGetReportMetadataYearTest extends SystemTestCase
{
public static $fixture = null; // initialized below class definition
public function getApiForTesting()
{
$params = array('idSite' => self::$fixture->idSite,
'date' => self::$fixture->dateTime,
'periods' => 'year',
'language' => 'fr');
return array(
array('API.getProcessedReport', $params),
array('LanguagesManager.getAvailableLanguageNames', $params),
array('SitesManager.getJavascriptTag', $params)
);
}
public static function getOutputPrefix()
{
return 'apiGetReportMetadata_year';
}
/**
* @dataProvider getApiForTesting
*/
public function testApi($api, $params)
{
$this->runApiTests($api, $params);
}
}
ApiGetReportMetadataYearTest::$fixture = new InvalidVisits();
ApiGetReportMetadataYearTest::$fixture->trackInvalidRequests = false;
|