Total Complexity | 4 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class DiceTest extends TestCase |
||
11 | { |
||
12 | /** |
||
13 | * Construct object and verify that the object has the expected |
||
14 | * properties, use no arguments. |
||
15 | */ |
||
16 | public function testCreateDice(): void |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Roll the dice and assert value is within bounds. |
||
27 | */ |
||
28 | public function testRollDice(): void |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Test that getValue returns the same value as returned by roll(). |
||
40 | */ |
||
41 | public function testGetValueAfterRoll(): void |
||
42 | { |
||
43 | $die = new Dice(); |
||
44 | $rolled = $die->roll(); |
||
45 | $this->assertSame($rolled, $die->getValue()); |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * Test that getValue throws an exception if the dice has not been rolled yet. |
||
50 | */ |
||
51 | public function testGetValueThrowsException(): void |
||
57 | } |
||
58 | } |
||
59 |