public function add(Unit $unit) { $unit->setArmy($this); $this->units[] = $unit; }
/** @test */ function it_is_alive_when_more_than_zero_hitpoints() { $this->unit->loseHitpoints(44); $this->assertTrue($this->unit->isAlive()); }