function BackupMigrateUnitTest::setUp in Backup and Migrate 5
Same name and namespace in other branches
- 6.3 tests/backup_migrate.unit.test \BackupMigrateUnitTest::setUp()
- 6.2 tests/backup_migrate.unit.test \BackupMigrateUnitTest::setUp()
SimpleTest core method: code run before each and every test method.
File
- tests/
BackupMigrateUnitTest.test, line 24
Class
- BackupMigrateUnitTest
- Unit tests for Backup and Migrate module.
Code
function setUp() {
parent::setUp();
// move the existing backup dir out of the way
$directory = _backup_migrate_get_save_path();
if (is_dir($directory)) {
$this->directory_backup = $directory . $this
->randomName(5, '_');
rename($directory, $this->directory_backup);
}
}