public function it_can_parse_multiple_parens(Elevator $elevator) { $elevator->goDown()->shouldBeCalledTimes(4); $elevator->goUp()->shouldBeCalledTimes(3); $elevator->getFloor()->shouldBeCalledTimes(7); $this->parseInstructions("))(()()"); }
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('(()()(()('); }