Ejemplo n.º 1
0
 /**
  * @param string|null $wantedUnit
  * @return Speed
  */
 public function getSpeed($wantedUnit = null)
 {
     return $this->speedTable->toSpeed($this, $wantedUnit);
 }
Ejemplo n.º 2
0
 /**
  * @return SpeedBonus
  */
 public function getBonus()
 {
     return $this->speedTable->toBonus($this);
 }
Ejemplo n.º 3
0
 /**
  * @test
  * @expectedException \OutOfRangeException
  */
 public function I_can_not_convert_too_high_value_to_bonus()
 {
     $speedTable = new SpeedTable();
     $speedTable->toBonus(new Speed(32001, Speed::KM_PER_HOUR, $speedTable));
 }