/** * @expectedException \Oro\Bundle\EntityBundle\Exception\InvalidEntityException */ public function testAddConnectionShouldNotAllowConnectEmpty() { $obj = new Calendar(); $connection = new CalendarConnection(new Calendar()); ReflectionUtil::setPrivateProperty($connection, 'connectedCalendar', null); $obj->addConnection($connection); }
protected function setUpEvent(CalendarEvent $event, $id, $email) { $user = new User(); $user->setEmail($email); $calendar = new Calendar(); $calendar->setOwner($user); $event->setCalendar($calendar); ReflectionUtil::setPrivateProperty($event, 'id', $id); $event->setReminded(false); }