Unit tests.
More...
◆ setUp()
assAnswerOrderingTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assAnswerOrderingTest.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 }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
References defined.
◆ test_instantiateObject_shouldReturnInstance()
assAnswerOrderingTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 29 of file assAnswerOrderingTest.php.
30 {
31
32 require_once './Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElement.php';
33
34
36
37 $this->assertInstanceOf('ilAssOrderingElement', $instance);
38 }
◆ test_setGetAnswerId()
assAnswerOrderingTest::test_setGetAnswerId |
( |
| ) |
|
Definition at line 55 of file assAnswerOrderingTest.php.
56 {
57
58 require_once './Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElement.php';
60 $expected = 13579;
61
62
63 $instance->setId($expected);
64 $actual = $instance->getId();
65
66
67 $this->assertEquals($expected, $actual);
68 }
◆ test_setGetOrdeingDepth()
assAnswerOrderingTest::test_setGetOrdeingDepth |
( |
| ) |
|
Definition at line 71 of file assAnswerOrderingTest.php.
72 {
73
74 require_once './Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElement.php';
76 $expected = 13579;
77
78
79 $instance->setIndentation($expected);
80 $actual = $instance->getIndentation();
81
82
83 $this->assertEquals($expected, $actual);
84 }
◆ test_setGetRandomId()
assAnswerOrderingTest::test_setGetRandomId |
( |
| ) |
|
Definition at line 40 of file assAnswerOrderingTest.php.
41 {
42
43 require_once './Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElement.php';
45 $expected = 13579;
46
47
48 $instance->setRandomIdentifier($expected);
49 $actual = $instance->getRandomIdentifier();
50
51
52 $this->assertEquals($expected, $actual);
53 }
◆ $backupGlobals
assAnswerOrderingTest::$backupGlobals = FALSE |
|
protected |
The documentation for this class was generated from the following file: