public function test_response_ShouldContainBulkTrackingApiResponse() { $this->tracker->doTrackPageView('Test'); $this->tracker->doTrackPageView('Test'); // test skipping invalid site errors $this->tracker->setIdSite(5); $this->tracker->doTrackPageView('Test'); $response = $this->tracker->doBulkTrack(); $this->assertEquals('{"status":"success","tracked":2,"invalid":1}', $response); }
public function test_response_ShouldContainBulkTrackingApiResponse() { $this->tracker->doTrackPageView('Test'); $this->tracker->doTrackPageView('Test'); // test skipping invalid site errors $this->tracker->setIdSite(5); $this->tracker->doTrackPageView('Test'); $this->tracker->setIdSite(1); $this->tracker->doTrackPageView('Test'); // another invalid one to further test the invalid request indices in the result $this->tracker->setIdSite(7); $this->tracker->doTrackPageView('Test'); $response = $this->tracker->doBulkTrack(); $this->assertEquals('{"status":"success","tracked":3,"invalid":2,"invalid_indices":[2,4]}', $response); }