public function testGetConnectionListQueryBuilder()
 {
     /** @var CalendarConnectionRepository $repo */
     $repo = $this->em->getRepository('OroCalendarBundle:CalendarConnection');
     $qb = $repo->getConnectionListQueryBuilder(1);
     $this->assertEquals('SELECT calendarConnection, connectedCalendar, owner' . ' FROM Oro\\Bundle\\CalendarBundle\\Entity\\CalendarConnection calendarConnection' . ' INNER JOIN calendarConnection.calendar calendar' . ' INNER JOIN calendarConnection.connectedCalendar connectedCalendar' . ' INNER JOIN connectedCalendar.owner owner' . ' WHERE calendar.id = :id ORDER BY calendarConnection.createdAt ASC', $qb->getQuery()->getDQL());
 }
 public function testGetEventsToRemindQueryBuilder()
 {
     /** @var CalendarEventRepository $repo */
     $repo = $this->em->getRepository('OroCalendarBundle:CalendarEvent');
     $qb = $repo->getEventsToRemindQueryBuilder(new \DateTime());
     $this->assertEquals('SELECT e, c, u' . ' FROM Oro\\Bundle\\CalendarBundle\\Entity\\CalendarEvent e' . ' INNER JOIN e.calendar c' . ' INNER JOIN c.owner u' . ' WHERE e.remindAt <= :current AND e.start > :current AND e.reminded = :reminded', $qb->getQuery()->getDQL());
 }