| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function testAsFloat() |
||
| 28 | { |
||
| 29 | $this->assertEquals(1.0, Decimal::fromString('1.0')->asFloat()); |
||
| 30 | $this->assertTrue(is_float(Decimal::fromString('1.0')->asFloat())); |
||
| 31 | |||
| 32 | $this->assertEquals(1.0, Decimal::fromInteger(1)->asFloat()); |
||
| 33 | $this->assertTrue(is_float(Decimal::fromInteger(1)->asFloat())); |
||
| 34 | |||
| 35 | $this->assertEquals(1.0, Decimal::fromFloat(1.0)->asFloat()); |
||
| 36 | $this->assertEquals(1.123123123, Decimal::fromString('1.123123123')->asFloat()); |
||
| 37 | |||
| 38 | $this->assertTrue(is_float(Decimal::fromFloat(1.0)->asFloat())); |
||
| 39 | $this->assertTrue(is_float(Decimal::fromString('1.123123123')->asFloat())); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |