public function testThrowExceptionIfAliasDoesNotExist() { $query = new Doctrine_RawSql(); $query->parseDqlQueryPart("select", "{test.test}"); try { $query->getSqlQuery(); $this->fail("Should throw exception"); } catch (Doctrine_RawSql_Exception $exception) { $this->assertEqual($exception->getMessage(), "The associated component for table alias test couldn't be found."); } }