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]); }
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); }
/** * @Transform :track */ public function transformStringToTrack($string) { return Track::numbered((int) $string); }
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); }