1 backup.test | protected BackupBaseTestCase::tearDown() |
Delete created files and temporary files directory, delete the tables created by setUp(), and reset the database prefix.
Overrides BackdropWebTestCase::tearDown
File
- core/
modules/ simpletest/ tests/ backup.test, line 70 - Test classes for verifying Backup and Restore functionality.
Class
- BackupBaseTestCase
- Base class for testing Backup and Restore functionality.
Code
protected function tearDown() {
parent::tearDown();
// Compare the list of backups to those from before the test run. Remove
// all the newly created backup files.
$new_backups = array_diff_key(backup_directory_list(), $this->backups);
foreach ($new_backups as $backup) {
file_unmanaged_delete_recursive($backup['backup_directory']);
}
}