This resource can be used to monitor the imbo installation to see if it has access to the current database and storage.
Author: Christer Edvartsen (cogo@starzinger.net)
Inheritance: implements Imbo\Resource\ResourceInterface
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);
 }