ImboUnitTest\Resource\ShortUrlTest::setUp PHP Method

setUp() public method

Set up the resource
public setUp ( )
    public function setUp()
    {
        $this->resource = $this->getNewResource();
        $this->route = $this->getMock('Imbo\\Router\\Route');
        $this->request = $this->getMock('Imbo\\Http\\Request\\Request');
        $this->request->expects($this->any())->method('getRoute')->will($this->returnValue($this->route));
        $this->response = $this->getMock('Imbo\\Http\\Response\\Response');
        $this->database = $this->getMock('Imbo\\Database\\DatabaseInterface');
        $this->event = $this->getMock('Imbo\\EventManager\\Event');
        $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('getDatabase')->will($this->returnValue($this->database));
    }