public function testCanSaveIntoFile() { $this->_driverMock->expects($this->once())->method('save')->with('doesnt-matter-2.jpg')->will($this->returnValue(true)); $i = new Zend_Image('doesnt-matter.jpg', $this->_driverMock); $this->assertTrue($i->save('doesnt-matter-2.jpg')); }