/** * @param string|null $wantedUnit * @return Speed */ public function getSpeed($wantedUnit = null) { return $this->speedTable->toSpeed($this, $wantedUnit); }
/** * @test * @expectedException \OutOfRangeException */ public function I_can_not_convert_too_high_bonus_to_too_detailed_unit() { $speedTable = new SpeedTable(); $speedTable->toSpeed(new SpeedBonus(100, $speedTable))->getMetersPerRound(); }