MDL-32505 lib/tests: fix unit test using removed table

This commit is contained in:
Dan Poltawski 2012-05-03 18:13:46 +08:00
parent 3246428b95
commit 2c3d986894

View File

@ -212,11 +212,9 @@ class core_phpunit_advanced_testcase extends advanced_testcase {
$record = $DB->get_record('context_temp', array());
$this->assertEquals(5, $record->id);
/** FIXME: danp
$this->assertEquals(0, $DB->count_records('course_display'));
$originaldisplayid = $DB->insert_record('course_display', array('userid'=>2, 'course'=>1, 'display'=>1));
$this->assertEquals(0, $DB->count_records('user_preferences'));
$originaldisplayid = $DB->insert_record('user_preferences', array('userid'=>2, 'name'=> 'phpunittest', 'value'=>'x'));
$this->assertEquals(1, $originaldisplayid);
*/
$course = $this->getDataGenerator()->create_course();
$this->assertEquals(2, $course->id);
@ -234,10 +232,8 @@ class core_phpunit_advanced_testcase extends advanced_testcase {
$course = $this->getDataGenerator()->create_course();
$this->assertEquals(2, $course->id);
/** FIXME: danp
$displayid = $DB->insert_record('course_display', array('userid'=>2, 'course'=>1, 'display'=>1));
$displayid = $DB->insert_record('user_preferences', array('userid'=>2, 'name'=> 'phpunittest', 'value'=>'x'));
$this->assertEquals($originaldisplayid, $displayid);
*/
$this->assertEquals(2, $DB->count_records('user'));
$DB->delete_records('user', array('id'=>2));