get() public method

Handle GET requests
public get ( Imbo\EventManager\EventInterface $event )
$event Imbo\EventManager\EventInterface The current event
Example #1
0
 /**
  * @covers Imbo\Resource\Status::get
  */
 public function testDoesNotUpdateStatusCodeWhenNoAdapterFails()
 {
     $this->database->expects($this->once())->method('getStatus')->will($this->returnValue(true));
     $this->storage->expects($this->once())->method('getStatus')->will($this->returnValue(true));
     $responseHeaders = $this->getMock('Symfony\\Component\\HttpFoundation\\HeaderBag');
     $responseHeaders->expects($this->once())->method('addCacheControlDirective')->with('no-store');
     $this->response->headers = $responseHeaders;
     $this->response->expects($this->never())->method('setStatusCode');
     $this->response->expects($this->once())->method('setModel')->with($this->isInstanceOf('Imbo\\Model\\Status'));
     $this->response->expects($this->once())->method('setMaxAge')->with(0)->will($this->returnSelf());
     $this->response->expects($this->once())->method('setPrivate')->will($this->returnSelf());
     $this->resource->get($this->event);
 }