Commit 2195894a authored by guilhermeblanco's avatar guilhermeblanco

[2.0] Added support to complex PathExpression in DQL queries

parent 3928ba9d
......@@ -94,13 +94,6 @@ class Parser
*/
private $_em;
/**
* The Abtract Syntax Tree of processed DQL query.
*
* @var SelectStatement | UpdateStatement | DeleteStatement
*/
private $_ast;
/**
* The Query to parse.
*
......@@ -201,16 +194,6 @@ class Parser
return $this->_em;
}
/**
* Gets the Abstract Syntax Tree generated by the parser.
*
* @return SelectStatement | UpdateStatement | DeleteStatement
*/
public function getAST()
{
return $this->_ast;
}
/**
* Registers a custom function that returns strings.
*
......
......@@ -59,25 +59,6 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
return $parser->parse();
}
public function parseDqlForAST($dql, $hints = array())
{
$query = $this->_em->createQuery($dql);
$query->setHint(Query::HINT_FORCE_PARTIAL_LOAD, true);
$query->setDql($dql);
foreach ($hints as $key => $value) {
$query->setHint($key, $value);
}
$parser = new \Doctrine\ORM\Query\Parser($query);
// We do NOT test SQL output here. That only unnecessarily slows down the tests!
$parser->setCustomOutputTreeWalker('Doctrine\Tests\Mocks\MockTreeWalker');
$parser->parse();
return $parser->getAST();
}
public function testEmptyQueryString()
{
$this->assertInvalidDql('');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment