Unit tests for assAnswerErrorTextTest.
More...
◆ setUp()
assAnswerErrorTextTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assAnswerErrorTextTest.php.
16 {
17 if (defined('ILIAS_PHPUNIT_CONTEXT')) {
18 include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
19 ilUnitUtil::performInitialisation();
20 } else {
21 chdir(dirname(__FILE__));
22 chdir('../../../');
23 }
24 }
◆ test_instantiateObjectFull()
assAnswerErrorTextTest::test_instantiateObjectFull |
( |
| ) |
|
Definition at line 39 of file assAnswerErrorTextTest.php.
40 {
41
42 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
43
44
46 'errortext',
47 'correcttext',
48 1
49 );
50
51
52 $this->assertTrue(true);
53 }
Class for error text answers.
◆ test_instantiateObjectSimple()
assAnswerErrorTextTest::test_instantiateObjectSimple |
( |
| ) |
|
Definition at line 26 of file assAnswerErrorTextTest.php.
27 {
28
29 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
30
31
33
34
35 $this->assertTrue(true);
36 }
◆ test_setGetPoints_valid()
assAnswerErrorTextTest::test_setGetPoints_valid |
( |
| ) |
|
Definition at line 55 of file assAnswerErrorTextTest.php.
56 {
57
58
59 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
61 $expected = 0.01;
62
63
64 $instance->points = $expected;
65 $actual = $instance->points;
66
67
68 $this->assertEquals($actual, $expected);
69 }
◆ test_setGetTextCorrect()
assAnswerErrorTextTest::test_setGetTextCorrect |
( |
| ) |
|
Definition at line 85 of file assAnswerErrorTextTest.php.
86 {
87
88 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
90 $expected = 'Correct text';
91
92
93 $instance->text_correct = $expected;
94 $actual = $instance->text_correct;
95
96
97 $this->assertEquals($actual, $expected);
98 }
◆ test_setGetTextWrong_valid()
assAnswerErrorTextTest::test_setGetTextWrong_valid |
( |
| ) |
|
Definition at line 100 of file assAnswerErrorTextTest.php.
101 {
102
103 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
105 $expected = 'Errortext';
106
107
108 $instance->text_wrong = $expected;
109 $actual = $instance->text_wrong;
110
111
112 $this->assertEquals($actual, $expected);
113 }
◆ test_setGetUnknown()
assAnswerErrorTextTest::test_setGetUnknown |
( |
| ) |
|
Definition at line 130 of file assAnswerErrorTextTest.php.
131 {
132
133 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
135 $expected = null;
136
137
138 $instance->undefined123 = 'No expectations';
139 $actual = $instance->undefined123;
140
141
142 $this->assertEquals($expected, $actual);
143 }
◆ test_setPoints_invalid()
assAnswerErrorTextTest::test_setPoints_invalid |
( |
| ) |
|
Definition at line 71 of file assAnswerErrorTextTest.php.
72 {
73
74 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
76 $expected = 'hokum';
77
78
79 $instance->points = $expected;
80 $actual = $instance->points;
81
82 $this->assertEquals($expected, $actual);
83 }
◆ test_setTextWrong_invalid()
assAnswerErrorTextTest::test_setTextWrong_invalid |
( |
| ) |
|
Definition at line 115 of file assAnswerErrorTextTest.php.
116 {
117
118 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
120 $expected = '';
121
122
123 $instance->text_wrong = $expected;
124 $actual = $instance->text_wrong;
125
126
127 $this->assertEquals($expected, $actual);
128 }
◆ $backupGlobals
assAnswerErrorTextTest::$backupGlobals = false |
|
protected |
The documentation for this class was generated from the following file: