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

setUp() public method

Set up the response formatter
public setUp ( )
    public function setUp()
    {
        $this->event = $this->getMock('Imbo\\EventManager\\Event');
        $this->request = $this->getMock('Imbo\\Http\\Request\\Request');
        $this->response = $this->getMock('Imbo\\Http\\Response\\Response');
        $this->event->expects($this->any())->method('getRequest')->will($this->returnValue($this->request));
        $this->event->expects($this->any())->method('getResponse')->will($this->returnValue($this->response));
        $this->event->expects($this->any())->method('getConfig')->will($this->returnValue(['contentNegotiateImages' => true]));
        $this->formatter = $this->getMock('Imbo\\Http\\Response\\Formatter\\FormatterInterface');
        $this->formatters = ['format' => $this->formatter];
        $this->contentNegotiation = $this->getMock('Imbo\\Http\\ContentNegotiation');
        $this->responseFormatter = new ResponseFormatter(['formatters' => $this->formatters, 'contentNegotiation' => $this->contentNegotiation]);
        $this->responseFormatter->setFormatter('format');
    }