Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function testIntegerCeil() |
||
13 | { |
||
14 | $this->assertTrue(Decimal::fromFloat(0.00)->ceil()->isZero()); |
||
15 | $this->assertTrue(Decimal::fromFloat(0.00)->ceil()->equals(Decimal::fromInteger(0))); |
||
16 | |||
17 | $this->assertFalse(Decimal::fromFloat(0.01)->ceil()->isZero()); |
||
18 | $this->assertFalse(Decimal::fromFloat(0.40)->ceil()->isZero()); |
||
19 | $this->assertFalse(Decimal::fromFloat(0.50)->ceil()->isZero()); |
||
20 | |||
21 | $this->assertTrue(Decimal::fromFloat(0.01)->ceil()->equals(Decimal::fromInteger(1))); |
||
22 | $this->assertTrue(Decimal::fromFloat(0.40)->ceil()->equals(Decimal::fromInteger(1))); |
||
23 | $this->assertTrue(Decimal::fromFloat(0.50)->ceil()->equals(Decimal::fromInteger(1))); |
||
24 | } |
||
25 | |||
44 |