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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 test_setGetLowerLimit_shouldReturnUnchangedLowerLimit ()
 
 test_setGetUpperLimit_shouldReturnUnchangedUpperLimit ()
 
 test_setGetOrder_shouldReturnUnchangedOrder ()
 
 test_setPoints_shouldReturnUnchangedPoints ()
 
 test_contains_shouldReturnTrueIfValueIsContained ()
 
 test_contains_shouldReturnFalseIfValueIsNotContained ()
 
 test_contains_shouldReturnFalseIfValueIsHokum ()
 

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

Member Function Documentation

◆ setUp()

assNumericRangeTest::setUp ( )
protected

Definition at line 30 of file assNumericRangeTest.php.

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

◆ test_contains_shouldReturnFalseIfValueIsHokum()

assNumericRangeTest::test_contains_shouldReturnFalseIfValueIsHokum ( )

Definition at line 124 of file assNumericRangeTest.php.

124  : void
125  {
126  $instance = new assNumericRange();
127  $instance->setLowerLimit(1.00);
128  $instance->setUpperLimit(10.00);
129  $expected = false;
130 
131  // Act
132  $actual = $instance->contains('Günther');
133 
134  // Assert
135  $this->assertEquals($expected, $actual);
136  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_contains_shouldReturnFalseIfValueIsNotContained()

assNumericRangeTest::test_contains_shouldReturnFalseIfValueIsNotContained ( )

Definition at line 110 of file assNumericRangeTest.php.

110  : void
111  {
112  $instance = new assNumericRange();
113  $instance->setLowerLimit(1.00);
114  $instance->setUpperLimit(10.00);
115  $expected = false;
116 
117  // Act
118  $actual = $instance->contains(15.00);
119 
120  // Assert
121  $this->assertEquals($expected, $actual);
122  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_contains_shouldReturnTrueIfValueIsContained()

assNumericRangeTest::test_contains_shouldReturnTrueIfValueIsContained ( )

Definition at line 96 of file assNumericRangeTest.php.

96  : void
97  {
98  $instance = new assNumericRange();
99  $instance->setLowerLimit(1.00);
100  $instance->setUpperLimit(10.00);
101  $expected = true;
102 
103  // Act
104  $actual = $instance->contains(5.00);
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_instantiateObject_shouldReturnInstance()

assNumericRangeTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 36 of file assNumericRangeTest.php.

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

◆ test_setGetLowerLimit_shouldReturnUnchangedLowerLimit()

assNumericRangeTest::test_setGetLowerLimit_shouldReturnUnchangedLowerLimit ( )

Definition at line 44 of file assNumericRangeTest.php.

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

◆ test_setGetOrder_shouldReturnUnchangedOrder()

assNumericRangeTest::test_setGetOrder_shouldReturnUnchangedOrder ( )

Definition at line 70 of file assNumericRangeTest.php.

70  : void
71  {
72  $instance = new assNumericRange();
73  $expected = 10;
74 
75  // Act
76  $instance->setOrder($expected);
77  $actual = $instance->getOrder();
78 
79  // Assert
80  $this->assertEquals($expected, $actual);
81  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_setGetUpperLimit_shouldReturnUnchangedUpperLimit()

assNumericRangeTest::test_setGetUpperLimit_shouldReturnUnchangedUpperLimit ( )

Definition at line 57 of file assNumericRangeTest.php.

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

◆ test_setPoints_shouldReturnUnchangedPoints()

assNumericRangeTest::test_setPoints_shouldReturnUnchangedPoints ( )

Definition at line 83 of file assNumericRangeTest.php.

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

Field Documentation

◆ $backupGlobals

assNumericRangeTest::$backupGlobals = false
protected

Definition at line 28 of file assNumericRangeTest.php.


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