|
@@ 55-65 (lines=11) @@
|
| 52 |
|
$this->assertEquals('60daysAgo', $dateRange->getStartDate()); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
public function testGetStartDimensionFilters() |
| 56 |
|
{ |
| 57 |
|
Config::inst()->update(GoogleAnalyticsReportService::class, 'starts_with', '/home'); |
| 58 |
|
|
| 59 |
|
$filters = $this->service->getDimensionFilters(); |
| 60 |
|
|
| 61 |
|
$this->assertTrue(is_array($filters)); |
| 62 |
|
foreach ($filters as $filter) { |
| 63 |
|
$this->assertInstanceOf(Google_Service_AnalyticsReporting_DimensionFilter::class, $filter); |
| 64 |
|
} |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
public function testGetEndDimensionFilters() |
| 68 |
|
{ |
|
@@ 67-77 (lines=11) @@
|
| 64 |
|
} |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
public function testGetEndDimensionFilters() |
| 68 |
|
{ |
| 69 |
|
Config::inst()->update(GoogleAnalyticsReportService::class, 'ends_with', '/home'); |
| 70 |
|
|
| 71 |
|
$filters = $this->service->getDimensionFilters(); |
| 72 |
|
|
| 73 |
|
$this->assertTrue(is_array($filters)); |
| 74 |
|
foreach ($filters as $filter) { |
| 75 |
|
$this->assertInstanceOf(Google_Service_AnalyticsReporting_DimensionFilter::class, $filter); |
| 76 |
|
} |
| 77 |
|
} |
| 78 |
|
|
| 79 |
|
public function testGetPageDimensionFilters() |
| 80 |
|
{ |
|
@@ 166-172 (lines=7) @@
|
| 163 |
|
$this->assertEquals('/home/test-page/', $page->Link()); |
| 164 |
|
} |
| 165 |
|
|
| 166 |
|
public function testGetBlacklistedPages() |
| 167 |
|
{ |
| 168 |
|
Config::inst()->update(GoogleAnalyticsReportService::class, 'blacklist', [ErrorPage::class]); |
| 169 |
|
$pages = $this->service->getPages(); |
| 170 |
|
$this->assertTrue(is_array($pages)); |
| 171 |
|
$this->assertNotContains('page-not-found', $pages); |
| 172 |
|
} |
| 173 |
|
} |
| 174 |
|
|