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

Public Member Functions

 test_constructorShouldReturnInstance ()
 
 test_setGetLowerBound ()
 
 test_setGetLowerBond_GreaterThanAnswerShouldSetAnswertext ()
 
 test_setGetLowerBound_nonNumericShouldSetAnswertext ()
 
 test_setGetUpperBound ()
 
 test_setGetUpperBound_smallerThanAnswerShouldSetAnswertext ()
 
 test_setGetUpperBound_nonNumericShouldSetAnswertext ()
 

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

Member Function Documentation

◆ setUp()

assAnswerClozeTest::setUp ( )
protected

Definition at line 30 of file assAnswerClozeTest.php.

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

◆ test_constructorShouldReturnInstance()

assAnswerClozeTest::test_constructorShouldReturnInstance ( )

Definition at line 36 of file assAnswerClozeTest.php.

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

◆ test_setGetLowerBond_GreaterThanAnswerShouldSetAnswertext()

assAnswerClozeTest::test_setGetLowerBond_GreaterThanAnswerShouldSetAnswertext ( )

Definition at line 58 of file assAnswerClozeTest.php.

58  : void
59  {
60  $instance = new assAnswerCloze('2');
61 
62  // Act
63  $expected = '2';
64  $instance->setLowerBound(4);
65  $actual = $instance->getLowerBound();
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...

◆ test_setGetLowerBound()

assAnswerClozeTest::test_setGetLowerBound ( )

Definition at line 45 of file assAnswerClozeTest.php.

45  : void
46  {
47  $instance = new assAnswerCloze('2');
48 
49  // Act
50  $expected = '1';
51  $instance->setLowerBound($expected);
52  $actual = $instance->getLowerBound();
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_setGetLowerBound_nonNumericShouldSetAnswertext()

assAnswerClozeTest::test_setGetLowerBound_nonNumericShouldSetAnswertext ( )

Definition at line 71 of file assAnswerClozeTest.php.

71  : void
72  {
73  $instance = new assAnswerCloze('3');
74 
75  // Act
76  $expected = '3';
77  $instance->setLowerBound('test');
78  $actual = $instance->getLowerBound();
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_setGetUpperBound()

assAnswerClozeTest::test_setGetUpperBound ( )

Definition at line 84 of file assAnswerClozeTest.php.

84  : void
85  {
86  $instance = new assAnswerCloze('1');
87 
88  // Act
89  $expected = '3';
90  $instance->setUpperBound($expected);
91  $actual = $instance->getUpperBound();
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_setGetUpperBound_nonNumericShouldSetAnswertext()

assAnswerClozeTest::test_setGetUpperBound_nonNumericShouldSetAnswertext ( )

Definition at line 110 of file assAnswerClozeTest.php.

110  : void
111  {
112  $instance = new assAnswerCloze('4');
113 
114  // Act
115  $expected = '4';
116  $instance->setUpperBound('test');
117  $actual = $instance->getUpperBound();
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_setGetUpperBound_smallerThanAnswerShouldSetAnswertext()

assAnswerClozeTest::test_setGetUpperBound_smallerThanAnswerShouldSetAnswertext ( )

Definition at line 97 of file assAnswerClozeTest.php.

97  : void
98  {
99  $instance = new assAnswerCloze('4');
100 
101  // Act
102  $expected = '4';
103  $instance->setUpperBound(2);
104  $actual = $instance->getUpperBound();
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...

Field Documentation

◆ $backupGlobals

assAnswerClozeTest::$backupGlobals = false
protected

Definition at line 28 of file assAnswerClozeTest.php.


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