Exemplo n.º 1
0
 public function testSendMoney()
 {
     $this->team->setMoney(1000);
     $targetTeam = new Team();
     $this->team->sendMoney($targetTeam, 500);
     $this->assertEquals(500, $this->team->getMoney());
     $this->assertEquals(500, $targetTeam->getMoney());
 }
Exemplo n.º 2
0
 /**
  * @param GameDate $gameDate
  *
  * @return Transfer
  */
 public function execute(GameDate $gameDate)
 {
     $this->targetTeam->sendMoney($this->originTeam, $this->amount);
     $this->player->setTeam($this->targetTeam);
     return Transfer::createFromOffer($this, $gameDate);
 }