| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function testStubRollDiceLastRoll() |
||
| 29 | { |
||
| 30 | // Create a stub for the Dice class. |
||
| 31 | $stub = $this->createMock(Dice::class); |
||
| 32 | |||
| 33 | // Configure the stub. |
||
| 34 | $stub->method('roll') |
||
| 35 | ->willReturn(6); |
||
| 36 | |||
| 37 | $res = $stub->roll(); |
||
| 38 | $exp = 6; |
||
| 39 | $this->assertEquals($exp, $res); |
||
| 40 | } |
||
| 41 | } |