예제 #1
0
 /**
  * @Then I am in the floor number :floorNumber
  */
 public function iAmInTheFloorNumber($floorNumber)
 {
     $targetFloor = new Floor($floorNumber);
     if (!$this->resident->getCurrentFloor()->isEqual($targetFloor)) {
         throw new \Exception("The I should be in the floor number {$floorNumber}");
     }
 }
예제 #2
0
 public function pressDownButton(Resident $resident)
 {
     $residentFloor = $resident->getCurrentFloor();
     $this->elevator->moveToFloor($residentFloor);
 }