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.assClozeSelectGap.php';
37 $this->assertInstanceOf(
'assClozeSelectGap', $instance);
43 require_once
'./Modules/TestQuestionPool/classes/class.assClozeSelectGap.php';
47 $actual = $instance->getShuffle();
49 $this->assertEquals($expected, $actual);
55 require_once
'./Modules/TestQuestionPool/classes/class.assClozeSelectGap.php';
59 $instance->setType($expected);
60 $actual = $instance->getShuffle();
62 $this->assertEquals($expected, $actual);
68 require_once
'./Modules/TestQuestionPool/classes/class.assClozeSelectGap.php';
70 $expected = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);
72 $actual = $instance->arrayShuffle($expected);
74 $this->assertNotEquals($expected, $actual);
80 require_once
'./Modules/TestQuestionPool/classes/class.assClozeSelectGap.php';
83 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerCloze.php';
89 $instance->addItem($item1);
90 $instance->addItem($item2);
91 $instance->addItem($item3);
92 $instance->addItem($item4);
94 $instance->setType(
true);
96 $expected = array($item1, $item2, $item3, $item4);
98 $actual = $instance->getItems();
100 $this->assertNotEquals($expected, $actual);
106 require_once
'./Modules/TestQuestionPool/classes/class.assClozeSelectGap.php';
109 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerCloze.php';
115 $instance->addItem($item1);
116 $instance->addItem($item2);
117 $instance->addItem($item3);
118 $instance->addItem($item4);
120 $instance->setType(
false);
122 $expected = array($item1, $item2, $item3, $item4);
124 $actual = $instance->getItems();
126 $this->assertEquals($expected, $actual);