Unit tests.
More...
◆ setUp()
assClozeSelectGapTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assClozeSelectGapTest.php.
References defined.
17 if (
defined(
'ILIAS_PHPUNIT_CONTEXT')) {
18 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
19 ilUnitUtil::performInitialisation();
21 chdir(dirname(__FILE__));
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
◆ test_arrayShuffle_shouldShuffleArray()
assClozeSelectGapTest::test_arrayShuffle_shouldShuffleArray |
( |
| ) |
|
Definition at line 49 of file assClozeSelectGapTest.php.
References array.
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);
Class for cloze question select gaps.
Create styles array
The data for the language used.
◆ test_getItemswithoutShuffle_shouldReturnItemsInOrder()
assClozeSelectGapTest::test_getItemswithoutShuffle_shouldReturnItemsInOrder |
( |
| ) |
|
Definition at line 93 of file assClozeSelectGapTest.php.
References array.
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.
Class for cloze question select gaps.
Create styles array
The data for the language used.
◆ test_getItemswithShuffle_shouldReturnShuffledItems()
assClozeSelectGapTest::test_getItemswithShuffle_shouldReturnShuffledItems |
( |
| ) |
|
Definition at line 60 of file assClozeSelectGapTest.php.
References array.
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);
Class for cloze question numeric answers.
Class for cloze question select gaps.
Create styles array
The data for the language used.
◆ test_instantiateObject_shouldReturnInstance()
assClozeSelectGapTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 26 of file assClozeSelectGapTest.php.
29 require_once
'./Modules/TestQuestionPool/classes/class.assClozeSelectGap.php';
34 $this->assertInstanceOf(
'assClozeSelectGap', $instance);
Class for cloze question select gaps.
◆ test_newlyInstatiatedObject_shouldReturnTrueOnGetShuffle()
assClozeSelectGapTest::test_newlyInstatiatedObject_shouldReturnTrueOnGetShuffle |
( |
| ) |
|
Definition at line 37 of file assClozeSelectGapTest.php.
40 require_once
'./Modules/TestQuestionPool/classes/class.assClozeSelectGap.php';
44 $actual = $instance->getShuffle();
46 $this->assertEquals($expected, $actual);
Class for cloze question select gaps.
◆ $backupGlobals
assClozeSelectGapTest::$backupGlobals = false |
|
protected |
The documentation for this class was generated from the following file: