Example #1
0
 /**
  *
  */
 public function fireCannons()
 {
     try {
         // Where be the navigator? Be we on course?
         $this->checkNavigator();
         // boom! direct hit Cap'n! Be gettin' the booty!
         $this->plunderEnemyShip();
         // report back to th' cap'n
         $this->response->setHeaders($this->controller->getHeaders());
         // show th' cap'n th' booty
         $booty = $this->getResponseBody();
     } catch (Exception $e) {
         // Feck! We be sinking Cap'n!
         $this->response->setHeaders($this->controller->getHeaders());
         $booty = $this->sinkingShip($e);
     }
     $this->response->setBody($booty);
     $this->response->send();
 }
 public function testGetHeaders()
 {
     $head = $this->controller->getHeaders();
     $this->assertInstanceOf('Bone\\Mvc\\Response\\Headers', $head);
 }