ImboUnitTest\Http\Response\ResponseFormatterTest::testDoesNotForceContentNegotiationOnErrorModelsWhenResourceIsNotAnImage PHP Method

testDoesNotForceContentNegotiationOnErrorModelsWhenResourceIsNotAnImage() public method

    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());
    }