public function assertSqlGeneration($dqlToBeTested, $sqlToBeConfirmed)
 {
     try {
         $query = $this->_em->createQuery($dqlToBeTested);
         parent::assertEquals($sqlToBeConfirmed, $query->getSql());
         $query->free();
     } catch (\Exception $e) {
         $this->fail($e->getMessage());
     }
 }
 public function assertSqlGeneration($dqlToBeTested, $sqlToBeConfirmed)
 {
     try {
         $query = $this->_em->createQuery($dqlToBeTested);
         $query->setHint(Query::HINT_FORCE_PARTIAL_LOAD, true)->useQueryCache(false);
         parent::assertEquals($sqlToBeConfirmed, $query->getSql());
         $query->free();
     } catch (\Exception $e) {
         $this->fail($e->getMessage());
     }
 }
 public function assertSqlGeneration($dqlToBeTested, $sqlToBeConfirmed)
 {
     try {
         $query = $this->_em->createQuery($dqlToBeTested);
         parent::assertEquals($sqlToBeConfirmed, $query->getSql());
         $query->free();
     } catch (Doctrine_Exception $e) {
         echo $e->getMessage();
         echo $e->getTraceAsString();
         die;
         $this->fail($e->getMessage());
     }
 }
 /**
  * Assert a valid SQL generation.
  * 
  * @param string $dqlToBeTested
  * @param string $sqlToBeConfirmed
  * @param array $queryHints
  * @param array $queryParams 
  */
 public function assertSqlGeneration($dqlToBeTested, $sqlToBeConfirmed, array $queryHints = array(), array $queryParams = array())
 {
     try {
         $query = $this->_em->createQuery($dqlToBeTested);
         foreach ($queryParams as $name => $value) {
             $query->setParameter($name, $value);
         }
         $query->setHint(Query::HINT_FORCE_PARTIAL_LOAD, true)->useQueryCache(false);
         foreach ($queryHints as $name => $value) {
             $query->setHint($name, $value);
         }
         parent::assertEquals($sqlToBeConfirmed, $query->getSql());
         $query->free();
     } catch (\Exception $e) {
         $this->fail($e->getMessage() . "\n" . $e->getTraceAsString());
     }
 }