Exemplo n.º 1
0
 protected function call($uri, $method, array $headers, $content = "")
 {
     $this->lastTrace = null;
     $this->tracer->info("Starting Trace");
     $this->application->tracer($this->tracer);
     $result = parent::call($uri, $method, $headers, $content);
     $this->application->tracer(new NullLogger());
     $this->tracer->info("Trace Completed");
     $this->lastTrace = new TraceResult($this->lastRequest, $this->lastResponse, $this->tracer->collected());
     $this->tracer->reset();
     return $result;
 }
Exemplo n.º 2
0
 public function testCollection()
 {
     $log = new CollectorLogger();
     $this->assertCount(0, $log->collected());
     $log->alert("This is a message");
     $this->assertCount(1, $log->collected());
     $log->reset();
     $this->assertCount(0, $log->collected());
 }