ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
assAnswerMatchingPairTest Class Reference

Unit tests. More...

+ Inheritance diagram for assAnswerMatchingPairTest:
+ Collaboration diagram for assAnswerMatchingPairTest:

Public Member Functions

 test_instantiateObjectSimple ()
 
 test_setGetTerm ()
 
 test_setGetDefinition ()
 
 test_setGetPoints ()
 
 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 assAnswerMatchingPairTest.php.

Member Function Documentation

◆ setUp()

assAnswerMatchingPairTest::setUp ( )
protected

Definition at line 15 of file assAnswerMatchingPairTest.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_instantiateObjectSimple()

assAnswerMatchingPairTest::test_instantiateObjectSimple ( )

Definition at line 29 of file assAnswerMatchingPairTest.php.

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

◆ test_setGetDefinition()

assAnswerMatchingPairTest::test_setGetDefinition ( )

Definition at line 56 of file assAnswerMatchingPairTest.php.

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

◆ test_setGetHokum()

assAnswerMatchingPairTest::test_setGetHokum ( )

Definition at line 86 of file assAnswerMatchingPairTest.php.

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

◆ test_setGetPoints()

assAnswerMatchingPairTest::test_setGetPoints ( )

Definition at line 71 of file assAnswerMatchingPairTest.php.

72 {
73 // Arrange
74 require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingPair.php';
75 $instance = new assAnswerMatchingPair();
76 $expected = 'Definition';
77
78 // Act
79 $instance->points = $expected;
80 $actual = $instance->points;
81
82 // Assert
83 $this->assertEquals($expected, $actual);
84 }

◆ test_setGetTerm()

assAnswerMatchingPairTest::test_setGetTerm ( )

Definition at line 41 of file assAnswerMatchingPairTest.php.

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

Field Documentation

◆ $backupGlobals

assAnswerMatchingPairTest::$backupGlobals = FALSE
protected

Definition at line 13 of file assAnswerMatchingPairTest.php.


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