ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
assNumericRangeTest.php
Go to the documentation of this file.
1 <?php
2 
27 {
28  protected $backupGlobals = false;
29 
30  protected function setUp(): void
31  {
32  chdir(__DIR__ . '/../../../../');
33  }
34 
36  {
37  $instance = new assNumericRange();
38 
39  $this->assertInstanceOf(assNumericRange::class, $instance);
40  }
41 
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  }
52 
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  }
63 
65  {
66  $instance = new assNumericRange();
67  $expected = 10;
68 
69  $instance->setOrder($expected);
70  $actual = $instance->getOrder();
71 
72  $this->assertEquals($expected, $actual);
73  }
74 
76  {
77  $instance = new assNumericRange();
78  $expected = 10;
79 
80  $instance->setPoints($expected);
81  $actual = $instance->getPoints();
82 
83  $this->assertEquals($expected, $actual);
84  }
85 
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  }
97 
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  }
109 
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  }
121 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
test_setGetLowerLimit_shouldReturnUnchangedLowerLimit()
Class assBaseTestCase.
test_contains_shouldReturnFalseIfValueIsNotContained()
test_setGetUpperLimit_shouldReturnUnchangedUpperLimit()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...