ImboUnitTest\EventListener\ImagickTest::testFetchesImageFromResponse PHP Method

testFetchesImageFromResponse() public method

    public function testFetchesImageFromResponse()
    {
        $image = $this->getMock('Imbo\\Model\\Image');
        $image->expects($this->once())->method('getBlob')->will($this->returnValue('image'));
        $this->response->expects($this->once())->method('getModel')->will($this->returnValue($image));
        $imagick = $this->getMock('Imagick');
        $imagick->expects($this->once())->method('readImageBlob')->with('image');
        $this->event->expects($this->once())->method('getName')->will($this->returnValue('storage.image.load'));
        $this->listener->setImagick($imagick)->readImageBlob($this->event);
    }