ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 
 getIRSSMock ()
 

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

Reimplemented from assBaseTestCase.

Definition at line 30 of file assNumericRangeTest.php.

30 : void
31 {
32 chdir(__DIR__ . '/../../../../');
33 }

◆ test_contains_shouldReturnFalseIfValueIsHokum()

assNumericRangeTest::test_contains_shouldReturnFalseIfValueIsHokum ( )

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 $actual = $instance->contains('Günther');
118
119 $this->assertEquals($expected, $actual);
120 }
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 98 of file assNumericRangeTest.php.

98 : void
99 {
100 $instance = new assNumericRange();
101 $instance->setLowerLimit(1.00);
102 $instance->setUpperLimit(10.00);
103 $expected = false;
104
105 $actual = $instance->contains(15.00);
106
107 $this->assertEquals($expected, $actual);
108 }

◆ test_contains_shouldReturnTrueIfValueIsContained()

assNumericRangeTest::test_contains_shouldReturnTrueIfValueIsContained ( )

Definition at line 86 of file assNumericRangeTest.php.

86 : void
87 {
88 $instance = new assNumericRange();
89 $instance->setLowerLimit(1.00);
90 $instance->setUpperLimit(10.00);
91 $expected = true;
92
93 $actual = $instance->contains(5.00);
94
95 $this->assertEquals($expected, $actual);
96 }

◆ test_instantiateObject_shouldReturnInstance()

assNumericRangeTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 35 of file assNumericRangeTest.php.

35 : void
36 {
37 $instance = new assNumericRange();
38
39 $this->assertInstanceOf(assNumericRange::class, $instance);
40 }

◆ test_setGetLowerLimit_shouldReturnUnchangedLowerLimit()

assNumericRangeTest::test_setGetLowerLimit_shouldReturnUnchangedLowerLimit ( )

Definition at line 42 of file assNumericRangeTest.php.

42 : void
43 {
44 $instance = new assNumericRange();
45 $expected = 1.00;
46
47 $instance->setLowerLimit($expected);
48 $actual = $instance->getLowerLimit();
49
50 $this->assertEquals($expected, $actual);
51 }

◆ test_setGetOrder_shouldReturnUnchangedOrder()

assNumericRangeTest::test_setGetOrder_shouldReturnUnchangedOrder ( )

Definition at line 64 of file assNumericRangeTest.php.

64 : void
65 {
66 $instance = new assNumericRange();
67 $expected = 10;
68
69 $instance->setOrder($expected);
70 $actual = $instance->getOrder();
71
72 $this->assertEquals($expected, $actual);
73 }

◆ test_setGetUpperLimit_shouldReturnUnchangedUpperLimit()

assNumericRangeTest::test_setGetUpperLimit_shouldReturnUnchangedUpperLimit ( )

Definition at line 53 of file assNumericRangeTest.php.

53 : void
54 {
55 $instance = new assNumericRange();
56 $expected = 10.00;
57
58 $instance->setUpperLimit($expected);
59 $actual = $instance->getUpperLimit();
60
61 $this->assertEquals($expected, $actual);
62 }

◆ test_setPoints_shouldReturnUnchangedPoints()

assNumericRangeTest::test_setPoints_shouldReturnUnchangedPoints ( )

Definition at line 75 of file assNumericRangeTest.php.

75 : void
76 {
77 $instance = new assNumericRange();
78 $expected = 10;
79
80 $instance->setPoints($expected);
81 $actual = $instance->getPoints();
82
83 $this->assertEquals($expected, $actual);
84 }

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: