Exemple #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));
 }
Exemple #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));
 }
Exemple #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));
 }
Exemple #4
0
 private function processBet(Bet $bet, $num)
 {
     return $bet->getType()->processBet($num);
 }
Exemple #5
0
 public function testGetType()
 {
     $this->assertInstanceOf('Del\\Casino\\Game\\Bet\\Type\\Roulette\\Colour', $this->bet->getType());
 }