MDL-41399 tool_generator: Removing unit test
authorDavid Monllao <davidm@moodle.com>
Mon, 2 Sep 2013 07:55:18 +0000 (15:55 +0800)
committerDavid Monllao <davidm@moodle.com>
Mon, 2 Sep 2013 07:55:18 +0000 (15:55 +0800)
Removing dodgy database reset in the
middle of a test as sequences reset
is not allowed.

admin/tool/generator/tests/maketestcourse_test.php

index 4aa29a9..966b0d8 100644 (file)
@@ -150,34 +150,5 @@ class tool_generator_maketestcourse_testcase extends advanced_testcase {
             $discussionstarters[$discussion->userid] = $discussion->subject;
         }
 
-        // Resetting data generators internal counters. Courses are created in individual
-        // processes so the counters are restarted before each course creation.
-        $this->resetAllData();
-        $this->setAdminUser();
-
-        // Create another S course to check that the same data was generated.
-        $backend = new tool_generator_backend('TOOL_S_COURSE_2', 1, true, false);
-        $courseid = $backend->make();
-        $course = get_course($courseid);
-        $modinfo = get_fast_modinfo($course);
-
-        // Check it generates the same number of page activities.
-        $this->assertEquals(count($modinfo->get_instances_of('page')), $npageinstances);
-
-        // Check it generates the same number of forum activities.
-        $forums = $modinfo->get_instances_of('forum');
-        $this->assertEquals(count($forums), $nforuminstances);
-
-        // Check same discussions have been started by the same users.
-        $discussions = forum_get_discussions(reset($forums), 'd.timemodified ASC');
-        reset($discussionstarters);
-        foreach ($discussions as $discussion) {
-            $previousdiscussionsubject = current($discussionstarters);
-            $previoususer = key($discussionstarters);
-            $this->assertEquals($discussion->userid, $previoususer);
-            $this->assertEquals($discussion->subject, $previousdiscussionsubject);
-            next($discussionstarters);
-        }
-
     }
 }