コード例 #1
0
 function let()
 {
     $conference = Conference::namedWithTracks('Symfony Live 2014', 2);
     $conference->scheduleTalk(Talk::named('BDD by Example'), Slot::fromString('09:00-09:45'), Track::numbered(1));
     $conference->scheduleTalk(Talk::named('Advanced Symfony'), Slot::fromString('09:00-09:45'), Track::numbered(2));
     $this->beConstructedThrough('ofConference', [$conference]);
 }
コード例 #2
0
 function it_allows_to_iterate_over_scheduled_talks()
 {
     $conf = $this->getWrappedObject();
     $talk = Talk::named('Advanced Symfony');
     $slot = Slot::fromString('09:00-09:45');
     $track = Track::numbered(2);
     $talkSchedule = new TalkSchedule($conf, $talk, $slot, $track);
     $this->scheduleTalk($talk, $slot, $track);
     $iterator = $this->getIterator();
     $iterator[0]->shouldBeLike($talkSchedule);
 }
コード例 #3
0
 /**
  * @Transform :track
  */
 public function transformStringToTrack($string)
 {
     return Track::numbered((int) $string);
 }
コード例 #4
0
 function it_can_say_if_another_talk_schedule_has_the_same_slot()
 {
     $anotherSchedule = new TalkSchedule(Conference::namedWithTracks('Symfony Live 2014', 2), Talk::named('Symfony by Example'), Slot::fromString('09:00-09:45'), Track::numbered(1));
     $this->shouldHaveSameSlotAs($anotherSchedule);
 }