コード例 #1
0
ファイル: ElfSpec.php プロジェクト: dstockto/AdventOfCode2015
 public function it_should_allow_multiple_santas_and_multiple_directions(Santa $santa, Santa $roboSanta)
 {
     $this->beConstructedWith([$santa, $roboSanta]);
     $santa->moveWest()->shouldBeCalled();
     $santa->moveEast()->shouldBeCalled();
     $roboSanta->moveNorth()->shouldBeCalled();
     $roboSanta->moveSouth()->shouldBeCalled();
     $this->readDirections('<^>v');
 }
コード例 #2
0
 public function it_can_translate_multiple_instructions(Santa $santa)
 {
     $santa->moveWest()->shouldBeCalledTimes(3);
     $santa->moveNorth()->shouldBeCalledTimes(4);
     $this->parse("<^^<<^^");
 }