diff --git a/admin/tool/uploadcourse/tests/course_test.php b/admin/tool/uploadcourse/tests/course_test.php index 8f862125e1b..fd33545a768 100644 --- a/admin/tool/uploadcourse/tests/course_test.php +++ b/admin/tool/uploadcourse/tests/course_test.php @@ -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() { diff --git a/admin/tool/uploadcourse/tests/helper_test.php b/admin/tool/uploadcourse/tests/helper_test.php index ae42a1e2a43..41a838c1753 100644 --- a/admin/tool/uploadcourse/tests/helper_test.php +++ b/admin/tool/uploadcourse/tests/helper_test.php @@ -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() { diff --git a/admin/tool/uploadcourse/tests/processor_test.php b/admin/tool/uploadcourse/tests/processor_test.php index 648fcc6d936..1dd20dc1927 100644 --- a/admin/tool/uploadcourse/tests/processor_test.php +++ b/admin/tool/uploadcourse/tests/processor_test.php @@ -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() { diff --git a/backup/util/plan/tests/step_test.php b/backup/util/plan/tests/step_test.php index ed7a70b94a1..44afd8d74c1 100644 --- a/backup/util/plan/tests/step_test.php +++ b/backup/util/plan/tests/step_test.php @@ -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); } /** diff --git a/backup/util/progress/tests/progress_test.php b/backup/util/progress/tests/progress_test.php index 0ba77486a47..1e4f8c8033a 100644 --- a/backup/util/progress/tests/progress_test.php +++ b/backup/util/progress/tests/progress_test.php @@ -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); } /** diff --git a/course/tests/courselib_test.php b/course/tests/courselib_test.php index 1935ec79a56..03a6ed3a8f4 100644 --- a/course/tests/courselib_test.php +++ b/course/tests/courselib_test.php @@ -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); } /** diff --git a/course/tests/externallib_test.php b/course/tests/externallib_test.php index 86936327598..92a5f6cff82 100644 --- a/course/tests/externallib_test.php +++ b/course/tests/externallib_test.php @@ -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); } /** diff --git a/lib/tests/statslib_test.php b/lib/tests/statslib_test.php index 50fd289d7f5..8e45f2237dc 100644 --- a/lib/tests/statslib_test.php +++ b/lib/tests/statslib_test.php @@ -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. * diff --git a/mod/assign/tests/upgradelib_test.php b/mod/assign/tests/upgradelib_test.php index 2df6e74e7c8..2c71b5ca9ac 100644 --- a/mod/assign/tests/upgradelib_test.php +++ b/mod/assign/tests/upgradelib_test.php @@ -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;