Total Complexity | 3 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
12 | class UsageTest extends TestCase |
||
13 | { |
||
14 | public function testInterface() |
||
15 | { |
||
16 | $usage = new Usage(42.24); |
||
17 | |||
18 | $this->assertSame(42.24, $usage->toFloat()); |
||
19 | $this->assertSame('42.24%', $usage->toString()); |
||
20 | } |
||
21 | |||
22 | public function testThrowWhenUsageLowerThanZero() |
||
23 | { |
||
24 | $this->expectException(OutOfBoundsPercentage::class); |
||
25 | |||
26 | new Usage(-1); |
||
27 | } |
||
28 | |||
29 | public function testThrowWhenUsageHigherThanHundred() |
||
34 | } |
||
35 | } |
||
36 |