예제 #1
0
 public function testSetReminderData()
 {
     $expectedSubject = 'subject';
     $expectedExpireAt = new \DateTime();
     $expectedRecipient = $this->getMock('Oro\\Bundle\\UserBundle\\Entity\\User');
     $reminderData = $this->getMock('Oro\\Bundle\\ReminderBundle\\Model\\ReminderDataInterface');
     $reminderData->expects($this->once())->method('getSubject')->will($this->returnValue($expectedSubject));
     $reminderData->expects($this->once())->method('getExpireAt')->will($this->returnValue($expectedExpireAt));
     $reminderData->expects($this->once())->method('getRecipient')->will($this->returnValue($expectedRecipient));
     $this->entity->setReminderData($reminderData);
     $this->assertEquals($expectedSubject, $this->entity->getSubject());
     $this->assertEquals($expectedExpireAt, $this->entity->getExpireAt());
     $this->assertEquals($expectedRecipient, $this->entity->getRecipient());
 }