コード例 #1
0
 public function testCity()
 {
     $journey = new TemplateMethod\CityJourney();
     $this->expectOutputRegex('#drink#');
     $journey->takeATrip();
 }
コード例 #2
0
 public function testCanGetOnAJourneyToACity()
 {
     $beachJourney = new TemplateMethod\CityJourney();
     $beachJourney->takeATrip();
     $this->assertEquals(['Buy a flight ticket', 'Taking the plane', 'Eat, drink, take photos and sleep', 'Buy a gift', 'Taking the plane'], $beachJourney->getThingsToDo());
 }