ImboUnitTest\Image\ImagePreparationTest::testDoesNotInstantiateCallableGenerator PHP Method

testDoesNotInstantiateCallableGenerator() public method

    public function testDoesNotInstantiateCallableGenerator()
    {
        $imagePath = FIXTURES_DIR . '/image.png';
        $imageData = file_get_contents($imagePath);
        $config['imageIdentifierGenerator'] = new CallableImageIdentifierGenerator();
        $event = $this->getMock('Imbo\\EventManager\\Event');
        $event->expects($this->any())->method('getRequest')->will($this->returnValue($this->request));
        $event->expects($this->any())->method('getResponse')->will($this->returnValue($this->response));
        $event->expects($this->any())->method('getConfig')->will($this->returnValue($config));
        $event->expects($this->any())->method('getDatabase')->will($this->returnValue($this->database));
        $this->request->expects($this->once())->method('getContent')->will($this->returnValue($imageData));
        $this->request->expects($this->once())->method('setImage')->with($this->isInstanceOf('Imbo\\Model\\Image'));
        $this->prepare->prepareImage($event);
    }