/** * @test */ public function addReminderToObjectStorageHoldingReminders() { $reminder = new \KevinDitscheid\KdCalendar\Domain\Model\Reminder(); $remindersObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('attach'), array(), '', FALSE); $remindersObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($reminder)); $this->inject($this->subject, 'reminders', $remindersObjectStorageMock); $this->subject->addReminder($reminder); }