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
  * @covers PHPSC\Conference\Domain\Entity\Event::getEndDate
  * @covers PHPSC\Conference\Domain\Entity\Event::setEndDate
  * @covers PHPSC\Conference\Domain\Entity\Event::getStartDate
  * @covers PHPSC\Conference\Domain\Entity\Event::setStartDate
  * @covers PHPSC\Conference\Domain\Entity\Event::isEventPeriod
  * @covers PHPSC\Conference\Domain\Entity\Event::isLateRegistrationPeriod
  */
 public function isLateRegistrationPeriodShouldReturnFalseWhenIsNotRegistrationPeriodButIsEventPeriod()
 {
     $event = new Event();
     $event->setRegistrationInfo($this->registrationInfo);
     $event->setStartDate(new DateTime('2014-08-29'));
     $event->setEndDate(new DateTime('2014-08-30'));
     $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-08-30 14:00:00'));
     $this->assertFalse($event->isLateRegistrationPeriod(new DateTime('2014-08-30 15:00:00')));
 }