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