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 {
19 include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
20 ilUnitUtil::performInitialisation();
21 }
22 else
23 {
24 chdir( dirname( __FILE__ ) );
25 chdir('../../../');
26 }
27 }
◆ test_instantiateObjectFull()
assAnswerErrorTextTest::test_instantiateObjectFull |
( |
| ) |
|
Definition at line 42 of file assAnswerErrorTextTest.php.
43 {
44
45 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
46
47
49 'errortext',
50 'correcttext',
51 1
52 );
53
54
55 $this->assertTrue(TRUE);
56 }
Class for error text answers.
◆ test_instantiateObjectSimple()
assAnswerErrorTextTest::test_instantiateObjectSimple |
( |
| ) |
|
Definition at line 29 of file assAnswerErrorTextTest.php.
30 {
31
32 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
33
34
36
37
38 $this->assertTrue(TRUE);
39 }
◆ test_setGetPoints_valid()
assAnswerErrorTextTest::test_setGetPoints_valid |
( |
| ) |
|
Definition at line 58 of file assAnswerErrorTextTest.php.
59 {
60
61
62 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
64 $expected = 0.01;
65
66
67 $instance->points = $expected;
68 $actual = $instance->points;
69
70
71 $this->assertEquals($actual, $expected);
72 }
◆ test_setGetTextCorrect()
assAnswerErrorTextTest::test_setGetTextCorrect |
( |
| ) |
|
Definition at line 88 of file assAnswerErrorTextTest.php.
89 {
90
91 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
93 $expected = 'Correct text';
94
95
96 $instance->text_correct = $expected;
97 $actual = $instance->text_correct;
98
99
100 $this->assertEquals($actual, $expected);
101 }
◆ test_setGetTextWrong_valid()
assAnswerErrorTextTest::test_setGetTextWrong_valid |
( |
| ) |
|
Definition at line 103 of file assAnswerErrorTextTest.php.
104 {
105
106 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
108 $expected = 'Errortext';
109
110
111 $instance->text_wrong = $expected;
112 $actual = $instance->text_wrong;
113
114
115 $this->assertEquals($actual, $expected);
116 }
◆ test_setGetUnknown()
assAnswerErrorTextTest::test_setGetUnknown |
( |
| ) |
|
Definition at line 133 of file assAnswerErrorTextTest.php.
134 {
135
136 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
138 $expected = null;
139
140
141 $instance->undefined123 = 'No expectations';
142 $actual = $instance->undefined123;
143
144
145 $this->assertEquals($expected, $actual);
146 }
◆ test_setPoints_invalid()
assAnswerErrorTextTest::test_setPoints_invalid |
( |
| ) |
|
Definition at line 74 of file assAnswerErrorTextTest.php.
75 {
76
77 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
79 $expected = 'hokum';
80
81
82 $instance->points = $expected;
83 $actual = $instance->points;
84
85 $this->assertEquals($expected, $actual);
86 }
◆ test_setTextWrong_invalid()
assAnswerErrorTextTest::test_setTextWrong_invalid |
( |
| ) |
|
Definition at line 118 of file assAnswerErrorTextTest.php.
119 {
120
121 require_once './Modules/TestQuestionPool/classes/class.assAnswerErrorText.php';
123 $expected = '';
124
125
126 $instance->text_wrong = $expected;
127 $actual = $instance->text_wrong;
128
129
130 $this->assertEquals($expected, $actual);
131 }
◆ $backupGlobals
assAnswerErrorTextTest::$backupGlobals = FALSE |
|
protected |
The documentation for this class was generated from the following file: