public static function fromTimeSlots(Collection $timeSlots) { $timeSlots = $timeSlots->map(function ($timeslot) { $show = ScheduledShow::fromShowAndDJ($timeslot->showForTimeslot, $timeslot->djForTimeslot); $show->setId($timeslot->id); $show->startsAt($timeslot->hour); $show->airsDayOfWeek($timeslot->day); return $show; }); return new WeeklySchedule($timeSlots); }
function it_should_return_a_shows_slider_style(ScheduledShow $show) { $show->sliderStyle()->willReturn('display: none'); $this->beConstructedThrough('fromScheduledShow', [$show]); $this->textStyle()->shouldBe('display: none'); }