}
}
$this->assertTrue($found);
-
- // Restore the time limit to prevent warning.
- set_time_limit(0);
}
public function test_restore_file() {
}
}
$this->assertTrue($found);
-
- // Restore the time limit to prevent warning.
- set_time_limit(0);
}
public function test_restore_invalid_file() {
$this->assertEquals($dir, $dir2);
$CFG->keeptempdirectoriesonbackup = $oldcfg;
-
- // Restore the time limit to prevent warning.
- set_time_limit(0);
}
public function test_get_role_ids() {
}
}
$this->assertTrue($found);
-
- // Restore the time limit to prevent warning.
- set_time_limit(0);
}
public function test_restore_restore_file() {
}
}
$this->assertTrue($found);
-
- // Restore the time limit to prevent warning.
- set_time_limit(0);
}
public function test_shortname_template() {
// Remove the test dir and any content
@remove_dir(dirname($file));
-
- // Clear the time limit, otherwise PHPUnit complains.
- set_time_limit(0);
}
/**
// There was 1 progress call.
$this->assertEquals(1, $progress->get_progress_count());
-
- // Clear the time limit, otherwise phpunit complains.
- set_time_limit(0);
}
/**
$this->assert_min_max(0.8, 0.8, $progress);
$progress->end_progress();
$this->assertFalse($progress->is_in_progress_section());
-
- set_time_limit(0);
}
/**
$this->assert_min_max(0.4, 1.0, $progress);
$progress->end_progress();
$this->assert_min_max(1.0, 1.0, $progress);
-
- set_time_limit(0);
}
/**
$this->assert_min_max(0.01, 0.01, $progress);
$progress->end_progress();
$this->assert_min_max(0.01, 0.01, $progress);
-
- // Clear the time limit, otherwise phpunit complains.
- set_time_limit(0);
}
/**
$this->assert_min_max(0.02, 0.02, $progress);
$progress->end_progress();
$this->assert_min_max(0.02, 0.02, $progress);
-
- set_time_limit(0);
}
/**
} catch (coding_exception $e) {
$this->assertEquals(1, preg_match('~would exceed max~', $e->getMessage()));
}
-
- // Clear the time limit, otherwise phpunit complains.
- set_time_limit(0);
}
/**
// Destroy the resource controller since we are done using it.
$rc->destroy();
unset($rc);
-
- // Clear the time limit, otherwise PHPUnit complains.
- set_time_limit(0);
}
/**
// Check that the course has been duplicated.
$this->assertEquals($newcourse['shortname'], $duplicate['shortname']);
-
- // Reset the timeouts.
- set_time_limit(0);
}
/**
$this->fail('Unknown CM found.');
}
}
-
- // Reset the timeout (see MDL-38989).
- set_time_limit(0);
}
/**
$this->fail('Unknown CM found.');
}
}
-
- // Reset the timeout (see MDL-38989).
- set_time_limit(0);
}
/**
// Check that course modules haven't changed, but that blocks have.
$this->assertEquals($initialcmcount, $newcmcount);
$this->assertEquals(($initialblockcount + 1), $newblockcount);
-
-
- // Reset the timeout (see MDL-38989).
- set_time_limit(0);
}
/**
$this->fail('Unknown CM found: '.$cm->name);
}
}
-
- // Reset the timeout (see MDL-38989).
- set_time_limit(0);
}
/**
$this->resetAfterTest();
}
- protected function tearDown() {
- // Reset the timeouts.
- set_time_limit(0);
- }
-
/**
* Function to setup database.
*
*/
class mod_assign_upgradelib_testcase extends mod_assign_base_testcase {
- protected function tearDown() {
- // Reset the timeouts.
- set_time_limit(0);
- }
-
public function test_upgrade_upload_assignment() {
global $DB, $CFG;