Esempio n. 1
0
 public function testCanCrop()
 {
     $zendImage = new Zend_Image_Transform(dirname(__FILE__) . '/' . $this->_file300x431, new Zend_Image_Driver_Gd());
     $this->assertEquals(md5($zendImage->crop(100, 100)->getBinary()), md5_file(dirname(__FILE__) . '/' . $this->_file100x100));
 }
Esempio n. 2
0
 public function testCanReturnZendImageOnCrop()
 {
     $this->_driverMock->expects($this->any())->method('getSize')->will($this->returnValue(array(1000, 500)));
     $transform = new Zend_Image_Transform('doesnt-matter.jpg', $this->_driverMock);
     $this->assertType('Zend_Image', $transform->crop(50, 50));
 }