17 if (defined(
'ILIAS_PHPUNIT_CONTEXT')) {
18 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
19 ilUnitUtil::performInitialisation();
21 chdir(dirname(__FILE__));
29 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
35 $this->assertInstanceOf(
'ASS_AnswerMatching', $instance);
41 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
46 $instance->setPoints($expected);
47 $actual = $instance->getPoints();
50 $this->assertEquals($expected, $actual);
56 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
61 $instance->setTermId($expected);
62 $actual = $instance->getTermId();
65 $this->assertEquals($expected, $actual);
71 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
73 $expected =
'/link/to/image?';
76 $instance->setPicture($expected);
77 $actual = $instance->getPicture();
80 $this->assertEquals($expected, $actual);
86 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
91 $instance->setPictureId($expected);
92 $actual = $instance->getPictureId();
95 $this->assertEquals($expected, $actual);
101 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
106 $instance->setPictureId(-47);
107 $actual = $instance->getPictureId();
110 $this->assertEquals($expected, $actual);
116 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
118 $expected =
'Definition is this.';
121 $instance->setDefinition($expected);
122 $actual = $instance->getDefinition();
125 $this->assertEquals($expected, $actual);
131 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
136 $instance->setDefinitionId($expected);
137 $actual = $instance->getDefinitionId();
140 $this->assertEquals($expected, $actual);
test_setGetPictureId_NegativeShouldNotSetValue()
test_instantiateObjectSimple()
test_setGetDefinitionId()
Class for matching question answers.