Imbo\Http\Response\ResponseFormatter::getFormatter PHP Method

getFormatter() public method

Get the formatter
public getFormatter ( ) : string
return string
    public function getFormatter()
    {
        return $this->formatter;
    }

Usage Example

Beispiel #1
0
 /**
  * @covers Imbo\Http\Response\ResponseFormatter::negotiate
  */
 public function testDoesNotForceContentNegotiationOnErrorModelsWhenResourceIsNotAnImage()
 {
     $route = new Route();
     $route->setName('user');
     $this->request->expects($this->once())->method('getExtension')->will($this->returnValue('json'));
     $this->request->expects($this->once())->method('getRoute')->will($this->returnValue($route));
     $this->response->expects($this->never())->method('setVary');
     $this->response->expects($this->once())->method('getModel')->will($this->returnValue($this->getMock('Imbo\\Model\\Error')));
     $this->responseFormatter->negotiate($this->event);
     $this->assertSame('json', $this->responseFormatter->getFormatter());
 }