Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
35 | public function testPlay(): void |
||
36 | { |
||
37 | $dealer = new Dealer(); |
||
38 | |||
39 | $card = new Card('2', 'Spades'); |
||
40 | |||
41 | $dealer->addCard($card); |
||
42 | $dealer->addCard($card); |
||
43 | |||
44 | while (true === $dealer->Play()) { |
||
45 | $handValue = $dealer->getHandValue(); |
||
46 | $this->assertLessThan(17, $handValue); |
||
47 | $dealer->addCard($card); |
||
48 | } |
||
49 | |||
50 | $handValue = $dealer->getHandValue(); |
||
51 | $this->assertGreaterThan(16, $handValue); |
||
52 | } |
||
54 |