public function it_should_log_instructions(Elevator $elevator)
 {
     $elevator->goDown()->shouldBeCalledTimes(1);
     $elevator->getFloor()->shouldBeCalledTimes(1)->willReturn('-1');
     $this->parseInstructions(')');
     $this->getInstructionsLog()->shouldBe(["-1"]);
 }
 function it_parses_multiple_instructions(Elevator $elevator)
 {
     $this->parseInstructions(')()))(');
     $elevator->goUp()->shouldHaveBeenCalledTimes(2);
     $elevator->goDown()->shouldHaveBeenCalledTimes(4);
 }
 public function it_goes_to_third_basement_level_with_close_open_close_close_open_close_close(Elevator $elevator)
 {
     $elevator->goUp()->shouldBeCalledTimes(2);
     $elevator->goDown()->shouldBeCalledTimes(5);
     $this->parseInstructions(')())())');
 }
 public function it_can_use_multiple_parens_to_control_elevator(Elevator $elevator)
 {
     $elevator->goUp()->shouldBeCalledTimes(6);
     $elevator->goDown()->shouldBeCalledTimes(3);
     $this->parseInstructions('(()()(()(');
 }