Ejemplo n.º 1
0
 public function testValidRequest()
 {
     $app = new Application();
     $app->attach(new ValidControllerFixture());
     $browser = new Browser($app);
     $resp = $browser->get("/");
     $this->assertEquals(200, $resp->getStatusCode());
 }
Ejemplo n.º 2
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;
 }