示例#1
0
 public function __construct(User $user, $flipType)
 {
     if (!Game::isValidFlipType($flipType)) {
         throw new InvalidFlipTypeException();
     }
     $this->user = $user;
     $this->flipType = $flipType;
 }
示例#2
0
 public function testIsValidFlipTypeReturnsFalseForInvalidFlipTypes()
 {
     $invalidType1 = 0;
     $invalidType2 = 3;
     $this->assertFalse(Game::isValidFlipType($invalidType1));
     $this->assertFalse(Game::isValidFlipType($invalidType2));
 }