Unit tests.
More...
◆ setUp()
assAnswerBinaryStateTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assAnswerBinaryStateTest.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_instantiateObject_shouldReturnInstance()
assAnswerBinaryStateTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 26 of file assAnswerBinaryStateTest.php.
29 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
34 $this->assertInstanceOf(
'ASS_AnswerBinaryState', $instance);
Class for true/false or yes/no answers.
◆ test_isStateChecked_shouldReturnActualState()
assAnswerBinaryStateTest::test_isStateChecked_shouldReturnActualState |
( |
| ) |
|
Definition at line 52 of file assAnswerBinaryStateTest.php.
55 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
60 $instance->setState($expected);
61 $actual = $instance->isStateChecked();
64 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_isStateSet_shouldReturnActualState()
assAnswerBinaryStateTest::test_isStateSet_shouldReturnActualState |
( |
| ) |
|
Definition at line 67 of file assAnswerBinaryStateTest.php.
70 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
75 $instance->setState($expected);
76 $actual = $instance->isStateSet();
79 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_isStateUnchecked_shouldReturnActualState()
assAnswerBinaryStateTest::test_isStateUnchecked_shouldReturnActualState |
( |
| ) |
|
Definition at line 97 of file assAnswerBinaryStateTest.php.
100 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
105 $instance->setState($expected);
106 $actual = !$instance->isStateUnchecked();
109 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_isStateUnset_shouldReturnActualState()
assAnswerBinaryStateTest::test_isStateUnset_shouldReturnActualState |
( |
| ) |
|
Definition at line 82 of file assAnswerBinaryStateTest.php.
85 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
90 $instance->setState($expected);
91 $actual = !$instance->isStateUnset();
94 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_setChecked_shouldAlterState()
assAnswerBinaryStateTest::test_setChecked_shouldAlterState |
( |
| ) |
|
Definition at line 112 of file assAnswerBinaryStateTest.php.
115 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
118 $instance->setState($expected);
121 $instance->setChecked();
122 $actual = $instance->isStateUnchecked();
125 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_setGetState_shouldReturnUnchangedState()
assAnswerBinaryStateTest::test_setGetState_shouldReturnUnchangedState |
( |
| ) |
|
Definition at line 37 of file assAnswerBinaryStateTest.php.
40 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
45 $instance->setState($expected);
46 $actual = $instance->getState();
49 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_setSet_shouldAlterState()
assAnswerBinaryStateTest::test_setSet_shouldAlterState |
( |
| ) |
|
Definition at line 144 of file assAnswerBinaryStateTest.php.
147 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
150 $instance->setState($expected);
154 $actual = $instance->isStateUnchecked();
157 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_setUnchecked_shouldAlterState()
assAnswerBinaryStateTest::test_setUnchecked_shouldAlterState |
( |
| ) |
|
Definition at line 128 of file assAnswerBinaryStateTest.php.
131 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
134 $instance->setState($expected);
137 $instance->setUnchecked();
138 $actual = $instance->isStateUnchecked();
141 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_setUnset_shouldAlterState()
assAnswerBinaryStateTest::test_setUnset_shouldAlterState |
( |
| ) |
|
Definition at line 160 of file assAnswerBinaryStateTest.php.
163 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
166 $instance->setState($expected);
169 $instance->setUnset();
170 $actual = $instance->isStateUnchecked();
173 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ $backupGlobals
assAnswerBinaryStateTest::$backupGlobals = false |
|
protected |
The documentation for this class was generated from the following file: