17 if (defined(
'ILIAS_PHPUNIT_CONTEXT'))
19 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
20 ilUnitUtil::performInitialisation();
24 chdir( dirname( __FILE__ ) );
32 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
38 $this->assertInstanceOf(
'ASS_AnswerMatching',$instance);
44 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
49 $instance->setPoints($expected);
50 $actual = $instance->getPoints();
53 $this->assertEquals($expected,$actual);
59 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
64 $instance->setTermId($expected);
65 $actual = $instance->getTermId();
68 $this->assertEquals($expected,$actual);
74 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
76 $expected =
'/link/to/image?';
79 $instance->setPicture($expected);
80 $actual = $instance->getPicture();
83 $this->assertEquals($expected,$actual);
89 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
94 $instance->setPictureId($expected);
95 $actual = $instance->getPictureId();
98 $this->assertEquals($expected,$actual);
104 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
109 $instance->setPictureId(-47);
110 $actual = $instance->getPictureId();
113 $this->assertEquals($expected,$actual);
119 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
121 $expected =
'Definition is this.';
124 $instance->setDefinition($expected);
125 $actual = $instance->getDefinition();
128 $this->assertEquals($expected,$actual);
134 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
139 $instance->setDefinitionId($expected);
140 $actual = $instance->getDefinitionId();
143 $this->assertEquals($expected,$actual);