Unit tests.
More...
◆ setUp()
assAnswerSimpleTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assAnswerSimpleTest.php.
References defined.
17 if (
defined(
'ILIAS_PHPUNIT_CONTEXT'))
19 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
20 ilUnitUtil::performInitialisation();
24 chdir( dirname( __FILE__ ) );
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
◆ test_instantiateObject_shouldReturnInstance()
assAnswerSimpleTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 29 of file assAnswerSimpleTest.php.
32 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
37 $this->assertInstanceOf(
'ASS_AnswerSimple', $instance);
Class for simple answers.
◆ test_setGetAnswertext_shouldReturnUnchangedAnswertext()
assAnswerSimpleTest::test_setGetAnswertext_shouldReturnUnchangedAnswertext |
( |
| ) |
|
Definition at line 55 of file assAnswerSimpleTest.php.
58 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
60 $expected =
'The answer, of course, is 42.';
63 $instance->setAnswertext($expected);
64 $actual = $instance->getAnswertext();
67 $this->assertEquals($expected, $actual);
Class for simple answers.
◆ test_setGetId_shouldReturnUnchangedId()
assAnswerSimpleTest::test_setGetId_shouldReturnUnchangedId |
( |
| ) |
|
Definition at line 40 of file assAnswerSimpleTest.php.
43 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
48 $instance->setId($expected);
49 $actual = $instance->getId();
52 $this->assertEquals($expected, $actual);
Class for simple answers.
◆ test_setGetOrder_shouldReturnUnchangedOrder()
assAnswerSimpleTest::test_setGetOrder_shouldReturnUnchangedOrder |
( |
| ) |
|
Definition at line 102 of file assAnswerSimpleTest.php.
105 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
110 $instance->setOrder($expected);
111 $actual = $instance->getOrder();
114 $this->assertEquals($expected, $actual);
Class for simple answers.
◆ test_setGetPoints_shouldReturnUnchangedPoints()
assAnswerSimpleTest::test_setGetPoints_shouldReturnUnchangedPoints |
( |
| ) |
|
Definition at line 70 of file assAnswerSimpleTest.php.
73 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
78 $instance->setPoints($expected);
79 $actual = $instance->getPoints();
82 $this->assertEquals($expected, $actual);
Class for simple answers.
◆ test_setGetPoints_shouldReturnUnchangedZeroOnNonNumericInput()
assAnswerSimpleTest::test_setGetPoints_shouldReturnUnchangedZeroOnNonNumericInput |
( |
| ) |
|
Definition at line 85 of file assAnswerSimpleTest.php.
90 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
95 $instance->setPoints(
'Günther');
96 $actual = $instance->getPoints();
99 $this->assertEquals($expected, $actual);
Class for simple answers.
◆ $backupGlobals
assAnswerSimpleTest::$backupGlobals = FALSE |
|
protected |
The documentation for this class was generated from the following file: