@@ -60,49 +60,6 @@ public function testDailyWalkWithDateHour(): void
6060 $ this ->dailyWalk ($ query );
6161 }
6262
63- public function testAdaptive (): void
64- {
65- $ query = $ this ->buildQuery ();
66- $ query ['antisampling ' ] = 'adaptive ' ;
67- $ query ['samplingLevel ' ] = 'SMALL ' ;
68- $ report = $ this ->client ->getBatch ($ query );
69-
70- Assert::arrayHasKey ($ report ['data ' ]);
71- Assert::assertNotEmpty ($ report ['data ' ]);
72- Assert::arrayHasKey ($ report ['query ' ]);
73- Assert::assertNotEmpty ($ report ['query ' ]);
74- Assert::arrayHasKey ($ report ['rowCount ' ]);
75- }
76-
77- public function testGaDateError (): void
78- {
79- $ this ->expectException (UserException::class);
80- $ this ->expectExceptionMessage (
81- 'At least one of these dimensions must be set in order to use anti-sampling: ' .
82- ' ga:date | ga:dateHour | ga:dateHourMinute '
83- );
84- $ query = $ this ->buildQuery ();
85- $ query ['antisampling ' ] = 'dailyWalk ' ;
86- $ query ['samplingLevel ' ] = 'SMALL ' ;
87- $ profile = ['id ' => getenv ('VIEW_ID ' )];
88- $ query ['query ' ]['dimensions ' ] = [
89- ['name ' => 'ga:week ' ],
90- ['name ' => 'ga:source ' ],
91- ['name ' => 'ga:medium ' ],
92- ['name ' => 'ga:landingPagePath ' ],
93- ['name ' => 'ga:pagePath ' ],
94- ];
95- $ query ['query ' ]['dateRanges ' ] = [[
96- 'startDate ' => date ('Y-m-d ' , strtotime ('-4 days ' )),
97- 'endDate ' => date ('Y-m-d ' , strtotime ('-1 day ' )),
98- ]];
99-
100- $ output = new Output ('/tmp/ga-test ' , 'outputBucket ' );
101- $ logger = new NullLogger ();
102- $ extractor = new Extractor ($ this ->client , $ output , $ logger );
103- $ extractor ->runProfiles ($ query , [$ profile ]);
104- }
105-
10663 private function dailyWalk (array $ query ): void
10764 {
10865 $ fs = new Filesystem ();
0 commit comments