/** * @return int */ public function tab() { $title = $this->response->getStatusCode(); $class = $this->response->getStatusCode() >= 400 ? 'danger' : 'success'; return ['title' => $title, 'class' => sprintf('response-code %s', $class)]; }
public function testBasicResponse() { $this->response->getBody()->write('Hello, World!'); $this->assertEquals('Hello, World!', $this->response->getBody()); $this->assertEquals(200, $this->response->getStatusCode()); }