- fixed test cases to expect the || SQL standard syntax
This commit is contained in:
parent
c6b6669a54
commit
cb1a71f163
@ -38,8 +38,8 @@ class Doctrine_Expression_TestCase extends Doctrine_UnitTestCase
|
|||||||
|
|
||||||
public function testSavingWithAnExpression()
|
public function testSavingWithAnExpression()
|
||||||
{
|
{
|
||||||
$e = new Doctrine_Expression("CONCAT('some', 'one')");
|
$e = new Doctrine_Expression("'some' || 'one'");
|
||||||
$this->assertEqual($e->getSql(), "CONCAT('some', 'one')");
|
$this->assertEqual($e->getSql(), "'some' || 'one'");
|
||||||
|
|
||||||
$u = new User();
|
$u = new User();
|
||||||
$u->name = $e;
|
$u->name = $e;
|
||||||
@ -56,8 +56,7 @@ class Doctrine_Expression_TestCase extends Doctrine_UnitTestCase
|
|||||||
|
|
||||||
public function testExpressionParserSupportsFunctionComposition()
|
public function testExpressionParserSupportsFunctionComposition()
|
||||||
{
|
{
|
||||||
$e = new Doctrine_Expression("SUBSTRING(CONCAT('some', 'one'), 0, 3)");
|
$e = new Doctrine_Expression("SUBSTRING('some' || 'one', 0, 3)");
|
||||||
$this->assertEqual($e->getSql(), "SUBSTR(CONCAT('some', 'one'), 0, 3)");
|
$this->assertEqual($e->getSql(), "SUBSTR('some' || 'one', 0, 3)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ class Doctrine_Query_TestCase extends Doctrine_UnitTestCase
|
|||||||
$q->from('User u')->leftJoin('u.Phonenumber p');
|
$q->from('User u')->leftJoin('u.Phonenumber p');
|
||||||
$q->getQuery();
|
$q->getQuery();
|
||||||
//Doctrine::dump($q->getCachedForm(array('foo' => 'bar')));
|
//Doctrine::dump($q->getCachedForm(array('foo' => 'bar')));
|
||||||
$this->assertEqual($q->parseClause("CONCAT('u.name', u.name)"), "CONCAT('u.name', e.name)");
|
$this->assertEqual($q->parseClause("CONCAT('u.name', u.name)"), "'u.name' || e.name");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class MyQuery extends Doctrine_Query
|
class MyQuery extends Doctrine_Query
|
||||||
|
Loading…
x
Reference in New Issue
Block a user