39 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
51 $obj_id = ($obj_id) ? $obj_id : 99999999;
52 include_once
'./Modules/TestQuestionPool/classes/class.assSingleChoice.php';
53 $sc =
new assSingleChoice(
'unit test single choice question',
'unit test single choice question comment',
'Helmut Schottmüller', -1,
'<p>is a <strong>unit test</strong> required?</p>');
66 $sc->setObjId($obj_id);
80 include_once
'./Modules/TestQuestionPool/classes/class.assSingleChoice.php';
82 $this->assertGreaterThan(0, $insert_id);
86 $sc->loadFromDb($insert_id);
87 $this->assertEquals($sc->getPoints(),1);
88 $this->assertEquals($sc->getTitle(),
"unit test single choice question");
89 $this->assertEquals($sc->getComment(),
"unit test single choice question comment");
90 $this->assertEquals($sc->getAuthor(),
"Helmut Schottmüller");
91 $this->assertEquals($sc->getQuestion(),
"<p>is a <strong>unit test</strong> required?</p>");
92 $this->assertEquals(count($sc->getAnswers()), 2);
93 $result = $sc->delete($insert_id);
94 $this->assertEquals($result,
true);