/** * @param array $methods * @return Mage_Backup_Snapshot */ public function testGetDbBackupFilename() { $manager = $this->getMock('Mage_Backup_Snapshot', array('getBackupFilename')); $file = 'var/backup/2.gz'; $manager->expects($this->once())->method('getBackupFilename')->will($this->returnValue($file)); $model = new Mage_Backup_Snapshot(); $model->setDbBackupManager($manager); $this->assertEquals($file, $model->getDbBackupFilename()); }
/** * Implementation Create Backup functionality for Snapshot * * @throws Mage_Exception * @return bool */ public function create() { $this->_prepareIgnoreList(); return parent::create(); }
/** * Set root directory of Magento installation * * @param string $rootDir * @throws Mage_Exception * @return Mage_Backup_Interface */ public function setRootDir($rootDir) { $this->_snapshotManager->setRootDir($rootDir); return $this; }