Example #1
0
 /**
  * @test
  */
 public function setEnableWaitlistForBooleanSetsEnableWaitlist()
 {
     $this->subject->setEnableWaitlist(true);
     $this->assertAttributeEquals(true, 'enableWaitlist', $this->subject);
 }
 /**
  * @test
  * @return void
  */
 public function isWaitlistRegistrationReturnsTrueIfEventFullyBookedAndNotEnoughFreePlaces()
 {
     $registrations = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', [], [], '', false);
     $registrations->expects($this->any())->method('count')->will($this->returnValue(11));
     $event = new Event();
     $event->setEnableWaitlist(true);
     $event->setMaxParticipants(10);
     $event->setRegistration($registrations);
     $this->assertTrue($this->subject->isWaitlistRegistration($event, 1));
 }