Example #1
0
 /**
  * @test
  * @covers PHPSC\Conference\Domain\Entity\Event::__construct
  * @covers PHPSC\Conference\Domain\Entity\Event::setRegistrationInfo
  * @covers PHPSC\Conference\Domain\Entity\Event::getRegistrationInfo
  * @covers PHPSC\Conference\Domain\Entity\Event::hasAttendeeRegistration
  * @covers PHPSC\Conference\Domain\Entity\Event::isRegistrationPeriod
  */
 public function isRegistrationPeriodShouldReturnTrueWhenGivenDateIsBetweenTheRegistrationPeriod()
 {
     $event = new Event();
     $event->setRegistrationInfo($this->registrationInfo);
     $this->registrationInfo->expects($this->any())->method('getStart')->willReturn(new DateTime('2014-05-05 00:00:00'));
     $this->registrationInfo->expects($this->any())->method('getEnd')->willReturn(new DateTime('2014-05-05 23:59:59'));
     $this->assertTrue($event->isRegistrationPeriod(new DateTime('2014-05-05 10:20:00')));
 }