예제 #1
0
파일: TrackerTest.php 프로젝트: cemo/piwik
 public function test_main_shouldReturnErrorResponse_InCaseOfAnyError()
 {
     $requestSet = new RequestSet();
     $requestSet->enableThrowExceptionOnInit();
     $handler = $this->getHandler();
     $handler->setResponse(new Response());
     $response = $this->tracker->main($handler, $requestSet);
     $this->assertSame('{"status":"error","tracked":0,"invalid":0}', $response);
 }
예제 #2
0
 public function test_main_shouldReturnResponse_EvenWhenThereWasAnExceptionDuringInitRequests()
 {
     $this->requestSet->enableThrowExceptionOnInit();
     $response = $this->tracker->main($this->handler, $this->requestSet);
     $this->assertEquals('Init requests and token auth exception', $response);
 }