public function testFinalizeWithEmptyBody()
 {
     $res = new \Slim\Http\Response('Foo', 304);
     $resFinal = $res->finalize();
     $this->assertEquals('', $resFinal[2]);
 }
 /**
  * Test finalize
  */
 public function testFinalizeWithoutBody()
 {
     $r = new \Slim\Http\Response();
     $r->status(204);
     $r['Content-Type'] = 'application/json';
     $r->write('Foo');
     $result = $r->finalize();
     $this->assertEquals(3, count($result));
     $this->assertEquals('', $result[2]);
 }