public function testCanFitOut() { $zendImage = new Zend_Image_Transform(dirname(__FILE__) . '/' . $this->_file300x431, new Zend_Image_Driver_Gd()); $this->assertEquals(md5($zendImage->fitOut(100, 100)->getBinary()), md5_file(dirname(__FILE__) . '/' . $this->_file100x144)); }
public function testCanFitOutOfFrameByWidth() { $this->_driverMock->expects($this->any(2))->method('getSize')->will($this->returnValue(array(500, 1000))); $this->_driverMock->expects($this->once())->method('resize')->with(50, 100); $transform = new Zend_Image_Transform('doesnt-matter.jpg', $this->_driverMock); $transform->fitOut(50, 50); }