[2.0] Small comments/todos on QueryBuilderTest.
This commit is contained in:
parent
a9ed0085d2
commit
838768d21f
@ -24,8 +24,8 @@ namespace Doctrine\ORM;
|
|||||||
use Doctrine\ORM\Query\Expr;
|
use Doctrine\ORM\Query\Expr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is responsible for building DQL query strings via a object oriented
|
* This class is responsible for building DQL query strings via an object oriented
|
||||||
* PHP interface
|
* PHP interface.
|
||||||
*
|
*
|
||||||
* TODO: I don't like the API of using the Expr::*() syntax inside of the QueryBuilder
|
* TODO: I don't like the API of using the Expr::*() syntax inside of the QueryBuilder
|
||||||
* methods. What can we do to allow them to do it more fluently with the QueryBuilder.
|
* methods. What can we do to allow them to do it more fluently with the QueryBuilder.
|
||||||
@ -33,7 +33,7 @@ use Doctrine\ORM\Query\Expr;
|
|||||||
* @author Jonathan H. Wage <jonwage@gmail.com>
|
* @author Jonathan H. Wage <jonwage@gmail.com>
|
||||||
* @author Roman Borschel <roman@code-factory.org>
|
* @author Roman Borschel <roman@code-factory.org>
|
||||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||||
* @link http://www.phpdoctrine.org
|
* @link http://www.doctrine-project.org
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
|
@ -36,6 +36,8 @@ require_once __DIR__ . '/../TestInit.php';
|
|||||||
* @link http://www.phpdoctrine.org
|
* @link http://www.phpdoctrine.org
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
|
* @todo Remove QueryBuilder::create. Use constructor in tests instead. Users will use
|
||||||
|
* $em->createQueryBuilder().
|
||||||
*/
|
*/
|
||||||
class QueryBuilderTest extends \Doctrine\Tests\OrmTestCase
|
class QueryBuilderTest extends \Doctrine\Tests\OrmTestCase
|
||||||
{
|
{
|
||||||
@ -51,6 +53,8 @@ class QueryBuilderTest extends \Doctrine\Tests\OrmTestCase
|
|||||||
$dql = $qb->getDql();
|
$dql = $qb->getDql();
|
||||||
$q = $qb->getQuery();
|
$q = $qb->getQuery();
|
||||||
|
|
||||||
|
//FIXME: QueryBuilder tests should not test the Parser or SQL building, so
|
||||||
|
// this block should probably be removed.
|
||||||
try {
|
try {
|
||||||
$q->getSql();
|
$q->getSql();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@ -58,6 +62,7 @@ class QueryBuilderTest extends \Doctrine\Tests\OrmTestCase
|
|||||||
echo $e->getTraceAsString();
|
echo $e->getTraceAsString();
|
||||||
$this->fail($e->getMessage());
|
$this->fail($e->getMessage());
|
||||||
}
|
}
|
||||||
|
//--
|
||||||
|
|
||||||
$this->assertEquals($expectedDql, $dql);
|
$this->assertEquals($expectedDql, $dql);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user