Exemple #1
0
 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());
 }
Exemple #2
0
 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());
 }