39 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
51 $obj_id = ($obj_id) ? $obj_id : 99999999;
52 include_once
'./Modules/TestQuestionPool/classes/class.assMultipleChoice.php';
54 $mc =
new assMultipleChoice(
'unit test multiple choice question',
'unit test multiple choice question comment',
'Helmut Schottmüller', -1,
'<p><strong>unit tests</strong> are...</p>');
79 $mc->setObjId($obj_id);
93 include_once
'./Modules/TestQuestionPool/classes/class.assMultipleChoice.php';
95 $this->assertGreaterThan(0, $insert_id);
99 $mc->loadFromDb($insert_id);
100 $this->assertEquals($mc->getPoints(),2);
101 $this->assertEquals($mc->getTitle(),
"unit test multiple choice question");
102 $this->assertEquals($mc->getComment(),
"unit test multiple choice question comment");
103 $this->assertEquals($mc->getAuthor(),
"Helmut Schottmüller");
104 $this->assertEquals($mc->getQuestion(),
"<p><strong>unit tests</strong> are...</p>");
105 $this->assertEquals(count($mc->getAnswers()), 4);
106 $result = $mc->delete($insert_id);
107 $this->assertEquals(
$result,
true);