37 if (defined(
'ILIAS_PHPUNIT_CONTEXT'))
39 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
40 ilUnitUtil::performInitialisation();
44 chdir( dirname( __FILE__ ) );
52 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
58 $this->assertInstanceOf(
'ASS_AnswerMatching',$instance);
64 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
69 $instance->setPoints($expected);
70 $actual = $instance->getPoints();
73 $this->assertEquals($expected,$actual);
79 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
84 $instance->setTermId($expected);
85 $actual = $instance->getTermId();
88 $this->assertEquals($expected,$actual);
94 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
96 $expected =
'/link/to/image?';
99 $instance->setPicture($expected);
100 $actual = $instance->getPicture();
103 $this->assertEquals($expected,$actual);
109 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
114 $instance->setPictureId($expected);
115 $actual = $instance->getPictureId();
118 $this->assertEquals($expected,$actual);
124 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
129 $instance->setPictureId(-47);
130 $actual = $instance->getPictureId();
133 $this->assertEquals($expected,$actual);
139 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
141 $expected =
'Definition is this.';
144 $instance->setDefinition($expected);
145 $actual = $instance->getDefinition();
148 $this->assertEquals($expected,$actual);
154 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerMatching.php';
159 $instance->setDefinitionId($expected);
160 $actual = $instance->getDefinitionId();
163 $this->assertEquals($expected,$actual);