ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
assAnswerMatchingTest 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 assAnswerMatchingTest:
+ Collaboration diagram for assAnswerMatchingTest:

Public Member Functions

 test_instantiateObjectSimple ()
 
 test_setGetPoints ()
 
 test_setGetTermId ()
 
 test_setGetPicture ()
 
 test_setGetPictureId ()
 
 test_setGetPictureId_NegativeShouldNotSetValue ()
 
 test_setGetDefinition ()
 
 test_setGetDefinitionId ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from assBaseTestCase
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIRSSMock ()
 
 getFileDeliveryMock ()
 
 getIliasMock ()
 
 addGlobal_uiFactory ()
 
 addGlobal_uiRenderer ()
 

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

Member Function Documentation

◆ setUp()

assAnswerMatchingTest::setUp ( )
protected

Definition at line 30 of file assAnswerMatchingTest.php.

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

◆ test_instantiateObjectSimple()

assAnswerMatchingTest::test_instantiateObjectSimple ( )

Definition at line 36 of file assAnswerMatchingTest.php.

36  : void
37  {
38  // Act
39  $instance = new ASS_AnswerMatching();
40 
41  // Assert
42  $this->assertInstanceOf('ASS_AnswerMatching', $instance);
43  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setGetDefinition()

assAnswerMatchingTest::test_setGetDefinition ( )

Definition at line 110 of file assAnswerMatchingTest.php.

110  : void
111  {
112  $instance = new ASS_AnswerMatching();
113  $expected = 'Definition is this.';
114 
115  // Act
116  $instance->setDefinition($expected);
117  $actual = $instance->getDefinition();
118 
119  // Assert
120  $this->assertEquals($expected, $actual);
121  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setGetDefinitionId()

assAnswerMatchingTest::test_setGetDefinitionId ( )

Definition at line 123 of file assAnswerMatchingTest.php.

123  : void
124  {
125  $instance = new ASS_AnswerMatching();
126  $expected = 10;
127 
128  // Act
129  $instance->setDefinitionId($expected);
130  $actual = $instance->getDefinitionId();
131 
132  // Assert
133  $this->assertEquals($expected, $actual);
134  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setGetPicture()

assAnswerMatchingTest::test_setGetPicture ( )

Definition at line 71 of file assAnswerMatchingTest.php.

71  : void
72  {
73  $instance = new ASS_AnswerMatching();
74  $expected = '/link/to/image?';
75 
76  // Act
77  $instance->setPicture($expected);
78  $actual = $instance->getPicture();
79 
80  // Assert
81  $this->assertEquals($expected, $actual);
82  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setGetPictureId()

assAnswerMatchingTest::test_setGetPictureId ( )

Definition at line 84 of file assAnswerMatchingTest.php.

84  : void
85  {
86  $instance = new ASS_AnswerMatching();
87  $expected = 47;
88 
89  // Act
90  $instance->setPictureId($expected);
91  $actual = $instance->getPictureId();
92 
93  // Assert
94  $this->assertEquals($expected, $actual);
95  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setGetPictureId_NegativeShouldNotSetValue()

assAnswerMatchingTest::test_setGetPictureId_NegativeShouldNotSetValue ( )

Definition at line 97 of file assAnswerMatchingTest.php.

97  : void
98  {
99  $instance = new ASS_AnswerMatching();
100  $expected = 0;
101 
102  // Act
103  $instance->setPictureId(-47);
104  $actual = $instance->getPictureId();
105 
106  // Assert
107  $this->assertEquals($expected, $actual);
108  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setGetPoints()

assAnswerMatchingTest::test_setGetPoints ( )

Definition at line 45 of file assAnswerMatchingTest.php.

45  : void
46  {
47  $instance = new ASS_AnswerMatching();
48  $expected = 10;
49 
50  // Act
51  $instance->setPoints($expected);
52  $actual = $instance->getPoints();
53 
54  // Assert
55  $this->assertEquals($expected, $actual);
56  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setGetTermId()

assAnswerMatchingTest::test_setGetTermId ( )

Definition at line 58 of file assAnswerMatchingTest.php.

58  : void
59  {
60  $instance = new ASS_AnswerMatching();
61  $expected = 10;
62 
63  // Act
64  $instance->setTermId($expected);
65  $actual = $instance->getTermId();
66 
67  // Assert
68  $this->assertEquals($expected, $actual);
69  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Field Documentation

◆ $backupGlobals

assAnswerMatchingTest::$backupGlobals = false
protected

Definition at line 28 of file assAnswerMatchingTest.php.


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