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.assClozeSelectGap.php';
34 $this->assertInstanceOf(
'assClozeSelectGap', $instance);
40 require_once
'./Modules/TestQuestionPool/classes/class.assClozeSelectGap.php';
44 $actual = $instance->getShuffle();
46 $this->assertEquals($expected, $actual);
52 require_once
'./Modules/TestQuestionPool/classes/class.assClozeSelectGap.php';
54 $expected =
array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);
57 $this->assertNotEquals($expected, $actual);
62 require_once
'./Modules/TestQuestionPool/classes/class.assClozeSelectGap.php';
65 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerCloze.php';
75 $instance->addItem($item1);
76 $instance->addItem($item2);
77 $instance->addItem($item3);
78 $instance->addItem($item4);
79 $instance->addItem($item5);
80 $instance->addItem($item6);
81 $instance->addItem($item7);
82 $instance->addItem($item8);
84 $instance->setType(
true);
86 $expected =
array($item1, $item2, $item3, $item4, $item5, $item6, $item7, $item8);
90 $this->assertNotEquals($expected, $actual);
95 require_once
'Services/Randomization/classes/class.ilArrayElementOrderKeeper.php';
96 require_once
'./Modules/TestQuestionPool/classes/class.assClozeSelectGap.php';
99 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerCloze.php';
105 $instance->addItem($item1);
106 $instance->addItem($item2);
107 $instance->addItem($item3);
108 $instance->addItem($item4);
110 $instance->setType(
false);
112 $expected =
array($item1, $item2, $item3, $item4);
115 $this->assertEquals($expected, $actual);
Class for cloze question numeric answers.
test_getItemswithShuffle_shouldReturnShuffledItems()
test_getItemswithoutShuffle_shouldReturnItemsInOrder()
Class for cloze question select gaps.
test_arrayShuffle_shouldShuffleArray()
Create styles array
The data for the language used.
test_newlyInstatiatedObject_shouldReturnTrueOnGetShuffle()
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
test_instantiateObject_shouldReturnInstance()