| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 41 | public function testStubRollDiceLastRoll(): void |
||
| 42 | { |
||
| 43 | // Create a stub for the Dice class. |
||
| 44 | $stub = $this->createMock(Dice::class); |
||
| 45 | |||
| 46 | // Configure the stub. |
||
| 47 | $stub->method('roll') |
||
| 48 | ->willReturn(6); |
||
| 49 | |||
| 50 | $res = $stub->roll(); |
||
| 51 | $exp = 6; |
||
| 52 | $this->assertEquals($exp, $res); |
||
| 53 | } |
||
| 55 |