/**
  * @param Time|null $timeStart
  * @param Time|null $timeEnd
  * @dataProvider validTimeRangeProvider
  */
 public function testValidDateWithTimeRange(Time $timeStart = null, Time $timeEnd = null)
 {
     $dateWithTimeRange = new DateWithTimeRange($this->date, $timeStart, $timeEnd);
     $this->assertEquals($this->date, $dateWithTimeRange->getDate());
     $this->assertEquals($timeStart, $dateWithTimeRange->getTimeStart());
     $this->assertEquals($timeEnd, $dateWithTimeRange->getTimeEnd());
 }
 public static function fromDomainDateWithRimeRange(DateWithTimeRange $dateWithTimeRange)
 {
     $dateWithTimeRangeEmbeddable = new DateWithTimeRangeEmbeddable();
     $dateWithTimeRangeEmbeddable->setDate($dateWithTimeRange->getDate());
     $dateWithTimeRangeEmbeddable->setTimeStart($dateWithTimeRange->getTimeStart());
     $dateWithTimeRangeEmbeddable->setTimeEnd($dateWithTimeRange->getTimeEnd());
     return $dateWithTimeRangeEmbeddable;
 }