public function testRunApplication() { $_SERVER['REQUEST_URI'] = '/some/prefix/response/set-body/custom.php?some-params'; $this->application->start(); self::assertTrue($this->response->hasBody()); self::assertEquals('foobar', $this->response->getBody()); }
public function testHasBodyShouldReturnFalseWhenBodyIsNull() { self::assertFalse($this->response->hasBody()); $this->response->setBody(''); self::assertTrue($this->response->hasBody()); $this->response->setBody(null); self::assertFalse($this->response->hasBody()); }