mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
Fixing unit test failures
This commit is contained in:
parent
96aad15ced
commit
1994d890c9
8 changed files with 263 additions and 88 deletions
|
@ -102,14 +102,16 @@ class backuplib_test extends UnitTestCase {
|
|||
backup_copy_user_files($preferences);
|
||||
|
||||
// Check for the existence of the backup file
|
||||
$this->assertTrue(file_exists("$CFG->dataroot/temp/backup/$preferences->backup_unique_code/user_files"));
|
||||
$backupfile = "$CFG->dataroot/temp/backup/$preferences->backup_unique_code/user_files";
|
||||
$this->assertTrue(file_exists($backupfile));
|
||||
|
||||
// Check for the existence of the user files in the backup file
|
||||
foreach ($this->testfiles as $file) {
|
||||
$parts = explode('/', $file);
|
||||
$section = $parts[0];
|
||||
$userid = $parts[1];
|
||||
$this->assertTrue(file_exists("$CFG->dataroot/temp/backup/$preferences->backup_unique_code/user_files/$section/$userid/f1.gif"));
|
||||
$userimage = "$CFG->dataroot/temp/backup/$preferences->backup_unique_code/user_files/$section/$userid/f1.gif";
|
||||
$this->assertTrue(file_exists($userimage));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue