ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 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

Definition at line 15 of file assAnswerMatchingTermTest.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 }

◆ test_getUnsetPicture()

assAnswerMatchingTermTest::test_getUnsetPicture ( )

Definition at line 71 of file assAnswerMatchingTermTest.php.

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

◆ test_instantiateObjectSimple()

assAnswerMatchingTermTest::test_instantiateObjectSimple ( )

Definition at line 29 of file assAnswerMatchingTermTest.php.

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

◆ test_setGetHokum()

assAnswerMatchingTermTest::test_setGetHokum ( )

Definition at line 100 of file assAnswerMatchingTermTest.php.

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

◆ test_setGetIdentifier()

assAnswerMatchingTermTest::test_setGetIdentifier ( )

Definition at line 85 of file assAnswerMatchingTermTest.php.

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

◆ test_setGetPicture()

assAnswerMatchingTermTest::test_setGetPicture ( )

Definition at line 56 of file assAnswerMatchingTermTest.php.

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

◆ test_setGetText()

assAnswerMatchingTermTest::test_setGetText ( )

Definition at line 41 of file assAnswerMatchingTermTest.php.

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

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: