MDL-42084 Unit tests: Remove unnecessary 'clear time limit change' lines

This commit is contained in:
sam marshall 2013-10-15 12:26:09 +01:00
parent 3ef7279f26
commit db0f0097e8
9 changed files with 0 additions and 62 deletions

View File

@ -651,9 +651,6 @@ class tool_uploadcourse_course_testcase extends advanced_testcase {
}
}
$this->assertTrue($found);
// Restore the time limit to prevent warning.
set_time_limit(0);
}
public function test_restore_file() {
@ -703,9 +700,6 @@ class tool_uploadcourse_course_testcase extends advanced_testcase {
}
}
$this->assertTrue($found);
// Restore the time limit to prevent warning.
set_time_limit(0);
}
public function test_restore_invalid_file() {

View File

@ -204,9 +204,6 @@ class tool_uploadcourse_helper_testcase extends advanced_testcase {
$this->assertEquals($dir, $dir2);
$CFG->keeptempdirectoriesonbackup = $oldcfg;
// Restore the time limit to prevent warning.
set_time_limit(0);
}
public function test_get_role_ids() {

View File

@ -96,9 +96,6 @@ class tool_uploadcourse_processor_testcase extends advanced_testcase {
}
}
$this->assertTrue($found);
// Restore the time limit to prevent warning.
set_time_limit(0);
}
public function test_restore_restore_file() {
@ -136,9 +133,6 @@ class tool_uploadcourse_processor_testcase extends advanced_testcase {
}
}
$this->assertTrue($found);
// Restore the time limit to prevent warning.
set_time_limit(0);
}
public function test_shortname_template() {

View File

@ -132,9 +132,6 @@ class backup_step_testcase extends advanced_testcase {
// Remove the test dir and any content
@remove_dir(dirname($file));
// Clear the time limit, otherwise PHPUnit complains.
set_time_limit(0);
}
/**

View File

@ -79,9 +79,6 @@ class backup_progress_testcase extends basic_testcase {
// There was 1 progress call.
$this->assertEquals(1, $progress->get_progress_count());
// Clear the time limit, otherwise phpunit complains.
set_time_limit(0);
}
/**
@ -160,8 +157,6 @@ class backup_progress_testcase extends basic_testcase {
$this->assert_min_max(0.8, 0.8, $progress);
$progress->end_progress();
$this->assertFalse($progress->is_in_progress_section());
set_time_limit(0);
}
/**
@ -194,8 +189,6 @@ class backup_progress_testcase extends basic_testcase {
$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);
}
/**
@ -210,9 +203,6 @@ class backup_progress_testcase extends basic_testcase {
$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);
}
/**
@ -233,8 +223,6 @@ class backup_progress_testcase extends basic_testcase {
$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);
}
/**
@ -331,9 +319,6 @@ class backup_progress_testcase extends basic_testcase {
} 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);
}
/**

View File

@ -1720,9 +1720,6 @@ class core_course_courselib_testcase extends advanced_testcase {
// 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);
}
/**

View File

@ -662,9 +662,6 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
// Check that the course has been duplicated.
$this->assertEquals($newcourse['shortname'], $duplicate['shortname']);
// Reset the timeouts.
set_time_limit(0);
}
/**
@ -1026,9 +1023,6 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
$this->fail('Unknown CM found.');
}
}
// Reset the timeout (see MDL-38989).
set_time_limit(0);
}
/**
@ -1080,9 +1074,6 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
$this->fail('Unknown CM found.');
}
}
// Reset the timeout (see MDL-38989).
set_time_limit(0);
}
/**
@ -1124,10 +1115,6 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
// 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);
}
/**
@ -1176,9 +1163,6 @@ class core_course_externallib_testcase extends externallib_advanced_testcase {
$this->fail('Unknown CM found: '.$cm->name);
}
}
// Reset the timeout (see MDL-38989).
set_time_limit(0);
}
/**

View File

@ -111,11 +111,6 @@ class core_statslib_testcase extends advanced_testcase {
$this->resetAfterTest();
}
protected function tearDown() {
// Reset the timeouts.
set_time_limit(0);
}
/**
* Function to setup database.
*

View File

@ -40,11 +40,6 @@ require_once($CFG->dirroot . '/mod/assign/tests/base_test.php');
*/
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;