ILIAS  release_8 Revision v8.24
assAnswerOrderingTest Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for assAnswerOrderingTest:
+ Collaboration diagram for assAnswerOrderingTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 test_setGetRandomId ()
 
 test_setGetAnswerId ()
 
 test_setGetOrdeingDepth ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from assBaseTestCase
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIliasMock ()
 

Protected Attributes

 $backupGlobals = false
 
- Protected Attributes inherited from assBaseTestCase
Container $dic = null
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Unit tests

Author
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de

Definition at line 26 of file assAnswerOrderingTest.php.

Member Function Documentation

◆ setUp()

assAnswerOrderingTest::setUp ( )
protected

Reimplemented from assBaseTestCase.

Definition at line 30 of file assAnswerOrderingTest.php.

30 : void
31 {
32 chdir(dirname(__FILE__));
33 chdir('../../../');
34 }

◆ test_instantiateObject_shouldReturnInstance()

assAnswerOrderingTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 36 of file assAnswerOrderingTest.php.

36 : void
37 {
38 // Arrange
39 require_once './Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElement.php';
40
41 // Act
42 $instance = new ilAssOrderingElement();
43
44 $this->assertInstanceOf('ilAssOrderingElement', $instance);
45 }

◆ test_setGetAnswerId()

assAnswerOrderingTest::test_setGetAnswerId ( )

Definition at line 62 of file assAnswerOrderingTest.php.

62 : void
63 {
64 // Arrange
65 require_once './Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElement.php';
66 $instance = new ilAssOrderingElement();
67 $expected = 13579;
68
69 // Act
70 $instance->setId($expected);
71 $actual = $instance->getId();
72
73 // Assert
74 $this->assertEquals($expected, $actual);
75 }

◆ test_setGetOrdeingDepth()

assAnswerOrderingTest::test_setGetOrdeingDepth ( )

Definition at line 78 of file assAnswerOrderingTest.php.

78 : void
79 {
80 // Arrange
81 require_once './Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElement.php';
82 $instance = new ilAssOrderingElement();
83 $expected = 13579;
84
85 // Act
86 $instance->setIndentation($expected);
87 $actual = $instance->getIndentation();
88
89 // Assert
90 $this->assertEquals($expected, $actual);
91 }

◆ test_setGetRandomId()

assAnswerOrderingTest::test_setGetRandomId ( )

Definition at line 47 of file assAnswerOrderingTest.php.

47 : void
48 {
49 // Arrange
50 require_once './Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElement.php';
51 $instance = new ilAssOrderingElement();
52 $expected = 13579;
53
54 // Act
55 $instance->setRandomIdentifier($expected);
56 $actual = $instance->getRandomIdentifier();
57
58 // Assert
59 $this->assertEquals($expected, $actual);
60 }

Field Documentation

◆ $backupGlobals

assAnswerOrderingTest::$backupGlobals = false
protected

Definition at line 28 of file assAnswerOrderingTest.php.


The documentation for this class was generated from the following file: