/** * @expectedException \Oro\Bundle\EntityBundle\Exception\InvalidEntityException */ public function testAddConnectionShouldNotAllowReconnect() { $obj = new Calendar(); $connection = new CalendarConnection(new Calendar()); $connection->setCalendar(new Calendar()); $obj->addConnection($connection); }