ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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.

References defined.

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  }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27

◆ test_instantiateObjectSimple()

assAnswerMatchingPairTest::test_instantiateObjectSimple ( )

Definition at line 26 of file assAnswerMatchingPairTest.php.

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

◆ test_setGetDefinition()

assAnswerMatchingPairTest::test_setGetDefinition ( )

Definition at line 53 of file assAnswerMatchingPairTest.php.

54  {
55  // Arrange
56  require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingPair.php';
57  $instance = new assAnswerMatchingPair();
58  $expected = 'Definition';
59 
60  // Act
61  $instance->definition = $expected;
62  $actual = $instance->definition;
63 
64  // Assert
65  $this->assertEquals($expected, $actual);
66  }
Class for matching question pairs.

◆ test_setGetHokum()

assAnswerMatchingPairTest::test_setGetHokum ( )

Definition at line 83 of file assAnswerMatchingPairTest.php.

84  {
85  // Arrange
86  require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingPair.php';
87  $instance = new assAnswerMatchingPair();
88  $expected = null;
89 
90  // Act
91  $instance->hokum = 'Hokum Value';
92  $actual = $instance->hokum;
93 
94  // Assert
95  $this->assertEquals($expected, $actual);
96  }
Class for matching question pairs.

◆ test_setGetPoints()

assAnswerMatchingPairTest::test_setGetPoints ( )

Definition at line 68 of file assAnswerMatchingPairTest.php.

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

◆ test_setGetTerm()

assAnswerMatchingPairTest::test_setGetTerm ( )

Definition at line 38 of file assAnswerMatchingPairTest.php.

39  {
40  // Arrange
41  require_once './Modules/TestQuestionPool/classes/class.assAnswerMatchingPair.php';
42  $instance = new assAnswerMatchingPair();
43  $expected = 'Term';
44 
45  // Act
46  $instance->term = $expected;
47  $actual = $instance->term;
48 
49  // Assert
50  $this->assertEquals($expected, $actual);
51  }
Class for matching question pairs.

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: