protected function BmTestBase::listBackupFiles in Backup and Migrate 7.3
Get a list of the files in a specific destination.
Parameters
string $destination_id: The ID of the destination to check. Defaults to the manual file path.
Return value
array The backup files found in the requested backup destination.
3 calls to BmTestBase::listBackupFiles()
- BmTestBase::deleteBackups in tests/
BmTestBase.test - Delete all of the files in a specific backup destination.
- BmTestEmail::testAddEmailDestination in tests/
BmTestEmail.test - Confirm the whole email process.
- BmTestProfiles::testFilenameOptions in tests/
BmTestProfiles.test - Confirm the backup filename processes work as expected.
File
- tests/
BmTestBase.test, line 133 - Shared functionality to make the rest of the tests simpler.
Class
- BmTestBase
- Base class for testing a module's custom tags.
Code
protected function listBackupFiles($destination_id = 'manual') {
require_once dirname(__FILE__) . '/../includes/destinations.inc';
$items = array();
// Load the destination object.
$destination = backup_migrate_get_destination($destination_id);
if (!empty($destination)) {
$items = $destination
->list_files();
}
return $items;
}