ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
assAnswerMatchingTermTest Class Reference

Unit tests. More...

+ Inheritance diagram for assAnswerMatchingTermTest:
+ Collaboration diagram for assAnswerMatchingTermTest:

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

 $backupGlobals = false
 

Detailed Description

Unit tests.

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

Definition at line 11 of file assAnswerMatchingTermTest.php.

Member Function Documentation

◆ setUp()

assAnswerMatchingTermTest::setUp ( )
protected

Reimplemented from assBaseTestCase.

Definition at line 15 of file assAnswerMatchingTermTest.php.

15 : void
16 {
17 if (defined('ILIAS_PHPUNIT_CONTEXT')) {
18 include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
19 ilUnitUtil::performInitialisation();
20 } else {
21 chdir(dirname(__FILE__));
22 chdir('../../../');
23 }
24 }

◆ test_getUnsetPicture()

assAnswerMatchingTermTest::test_getUnsetPicture ( )

Definition at line 68 of file assAnswerMatchingTermTest.php.

69 {
70 // Arrange
71 require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingTerm.php';
72 $instance = new assAnswerMatchingTerm();
73 $expected = null;
74
75 // Act
76 $actual = $instance->picture;
77
78 // Assert
79 $this->assertEquals($expected, $actual);
80 }
Class for matching question terms.

◆ test_instantiateObjectSimple()

assAnswerMatchingTermTest::test_instantiateObjectSimple ( )

Definition at line 26 of file assAnswerMatchingTermTest.php.

27 {
28 // Arrange
29 require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingTerm.php';
30
31 // Act
32 $instance = new assAnswerMatchingTerm();
33
34 // Assert
35 $this->assertInstanceOf('assAnswerMatchingTerm', $instance);
36 }

◆ test_setGetHokum()

assAnswerMatchingTermTest::test_setGetHokum ( )

Definition at line 97 of file assAnswerMatchingTermTest.php.

98 {
99 // Arrange
100 require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingTerm.php';
101 $instance = new assAnswerMatchingTerm();
102 $expected = null;
103
104 // Act
105 $instance->hokum = 'Hokum Value';
106 $actual = $instance->hokum;
107
108 // Assert
109 $this->assertEquals($expected, $actual);
110 }

◆ test_setGetIdentifier()

assAnswerMatchingTermTest::test_setGetIdentifier ( )

Definition at line 82 of file assAnswerMatchingTermTest.php.

83 {
84 // Arrange
85 require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingTerm.php';
86 $instance = new assAnswerMatchingTerm();
87 $expected = 12345;
88
89 // Act
90 $instance->identifier = $expected;
91 $actual = $instance->identifier;
92
93 // Assert
94 $this->assertEquals($expected, $actual);
95 }

◆ test_setGetPicture()

assAnswerMatchingTermTest::test_setGetPicture ( )

Definition at line 53 of file assAnswerMatchingTermTest.php.

54 {
55 // Arrange
56 require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingTerm.php';
57 $instance = new assAnswerMatchingTerm();
58 $expected = 'path/to/picture?';
59
60 // Act
61 $instance->picture = $expected;
62 $actual = $instance->picture;
63
64 // Assert
65 $this->assertEquals($expected, $actual);
66 }

◆ test_setGetText()

assAnswerMatchingTermTest::test_setGetText ( )

Definition at line 38 of file assAnswerMatchingTermTest.php.

39 {
40 // Arrange
41 require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingTerm.php';
42 $instance = new assAnswerMatchingTerm();
43 $expected = 'Text';
44
45 // Act
46 $instance->text = $expected;
47 $actual = $instance->text;
48
49 // Assert
50 $this->assertEquals($expected, $actual);
51 }

Field Documentation

◆ $backupGlobals

assAnswerMatchingTermTest::$backupGlobals = false
protected

Definition at line 13 of file assAnswerMatchingTermTest.php.


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