/** * @test */ public function addRegistrationWaitlistToObjectStorageHoldingRegistrationWaitlist() { $registration = new Registration(); $registrationObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', ['attach'], [], '', false); $registrationObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($registration)); $this->inject($this->subject, 'registrationWaitlist', $registrationObjectStorageMock); $this->subject->addRegistrationWaitlist($registration); }