tests/mocks/AnalyticsResponseHomePageMock.php 1 location
|
@@ 8-23 (lines=16) @@
|
5 |
|
use Google_Service_AnalyticsReporting_DateRangeValues; |
6 |
|
use Google_Service_AnalyticsReporting_ReportRow; |
7 |
|
|
8 |
|
class AnalyticsResponseHomePageMock extends Google_Service_AnalyticsReporting_ReportRow |
9 |
|
{ |
10 |
|
public $response; |
11 |
|
|
12 |
|
public function getDimensions() |
13 |
|
{ |
14 |
|
return [0 => '/']; |
15 |
|
} |
16 |
|
|
17 |
|
public function getMetrics() |
18 |
|
{ |
19 |
|
$return = new Google_Service_AnalyticsReporting_DateRangeValues(); |
20 |
|
$return->setValues([0 => 45477]); |
21 |
|
return [$return]; |
22 |
|
} |
23 |
|
} |
24 |
|
|
tests/mocks/AnalyticsResponseNoPageMock.php 1 location
|
@@ 8-23 (lines=16) @@
|
5 |
|
use Google_Service_AnalyticsReporting_DateRangeValues; |
6 |
|
use Google_Service_AnalyticsReporting_ReportRow; |
7 |
|
|
8 |
|
class AnalyticsResponseNoPageMock extends Google_Service_AnalyticsReporting_ReportRow |
9 |
|
{ |
10 |
|
public $response; |
11 |
|
|
12 |
|
public function getDimensions() |
13 |
|
{ |
14 |
|
return [0 => '/i-do-not-exist']; |
15 |
|
} |
16 |
|
|
17 |
|
public function getMetrics() |
18 |
|
{ |
19 |
|
$return = new Google_Service_AnalyticsReporting_DateRangeValues(); |
20 |
|
$return->setValues([0 => 1]); |
21 |
|
return [$return]; |
22 |
|
} |
23 |
|
} |
24 |
|
|