ILIAS  release_8 Revision v8.24
assAnswerMatchingTermTest 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 assAnswerMatchingTermTest:
+ Collaboration diagram for assAnswerMatchingTermTest:

Public Member Functions

 test_instantiateObjectSimple ()
 
 test_setGetText ()
 
 test_setGetPicture ()
 
 test_getUnsetPicture ()
 
 test_setGetIdentifier ()
 

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 assAnswerMatchingTermTest.php.

Member Function Documentation

◆ setUp()

assAnswerMatchingTermTest::setUp ( )
protected

Reimplemented from assBaseTestCase.

Definition at line 30 of file assAnswerMatchingTermTest.php.

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

◆ test_getUnsetPicture()

assAnswerMatchingTermTest::test_getUnsetPicture ( )

Definition at line 78 of file assAnswerMatchingTermTest.php.

78 : void
79 {
80 // Arrange
81 require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingTerm.php';
82 $instance = new assAnswerMatchingTerm();
83 $expected = null;
84
85 // Act
86 $actual = $instance->getPicture();
87
88 // Assert
89 $this->assertEquals($expected, $actual);
90 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_instantiateObjectSimple()

assAnswerMatchingTermTest::test_instantiateObjectSimple ( )

Definition at line 36 of file assAnswerMatchingTermTest.php.

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

◆ test_setGetIdentifier()

assAnswerMatchingTermTest::test_setGetIdentifier ( )

Definition at line 92 of file assAnswerMatchingTermTest.php.

92 : void
93 {
94 // Arrange
95 require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingTerm.php';
96 $instance = new assAnswerMatchingTerm();
97 $expected = 12345;
98
99 // Act
100 $instance = $instance->withIdentifier($expected);
101 $actual = $instance->getIdentifier();
102
103 // Assert
104 $this->assertEquals($expected, $actual);
105 }

◆ test_setGetPicture()

assAnswerMatchingTermTest::test_setGetPicture ( )

Definition at line 63 of file assAnswerMatchingTermTest.php.

63 : void
64 {
65 // Arrange
66 require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingTerm.php';
67 $instance = new assAnswerMatchingTerm();
68 $expected = 'path/to/picture?';
69
70 // Act
71 $instance = $instance->withPicture($expected);
72 $actual = $instance->getPicture();
73
74 // Assert
75 $this->assertEquals($expected, $actual);
76 }

◆ test_setGetText()

assAnswerMatchingTermTest::test_setGetText ( )

Definition at line 48 of file assAnswerMatchingTermTest.php.

48 : void
49 {
50 // Arrange
51 require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingTerm.php';
52 $instance = new assAnswerMatchingTerm();
53 $expected = 'Text';
54
55 // Act
56 $instance = $instance->withText($expected);
57 $actual = $instance->getText();
58
59 // Assert
60 $this->assertEquals($expected, $actual);
61 }

Field Documentation

◆ $backupGlobals

assAnswerMatchingTermTest::$backupGlobals = false
protected

Definition at line 28 of file assAnswerMatchingTermTest.php.


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