Ejemplo n.º 1
0
 public function testProcessBet()
 {
     $this->type = new Split(31, 34);
     $bet = new Bet($this->player, $this->type, 100);
     $this->assertFalse($bet->getType()->processBet(0));
     //        $this->assertTrue($bet->getType()->processBet(31));
     $this->assertFalse($bet->getType()->processBet(20));
     $this->assertTrue($bet->getType()->processBet(34));
 }
Ejemplo n.º 2
0
 public function testProcessBet()
 {
     $this->type = new Colour(Colour::RED);
     $bet = new Bet($this->player, $this->type, 100, 2);
     $this->assertFalse($bet->getType()->processBet(0));
     $this->assertTrue($bet->getType()->processBet(1));
     $this->assertFalse($bet->getType()->processBet(2));
     $this->assertTrue($bet->getType()->processBet(3));
 }
Ejemplo n.º 3
0
 public function testProcessBet()
 {
     $this->type = new Number(17);
     $bet = new Bet($this->player, $this->type, 100);
     $this->assertFalse($bet->getType()->processBet(0));
     $this->assertTrue($bet->getType()->processBet(17));
     $this->assertFalse($bet->getType()->processBet(31));
     $this->assertFalse($bet->getType()->processBet(34));
 }
Ejemplo n.º 4
0
 private function processBet(Bet $bet, $num)
 {
     return $bet->getType()->processBet($num);
 }
Ejemplo n.º 5
0
 public function testGetOdds()
 {
     $this->assertTrue(is_numeric($this->bet->getOdds()));
 }