1
0
mirror of synced 2024-12-13 14:56:01 +03:00
This commit is contained in:
zYne 2007-12-10 19:12:13 +00:00
parent 3500a6fb17
commit 7a78c39e81

View File

@ -180,28 +180,28 @@ class Doctrine_Query_AggregateValue_TestCase extends Doctrine_UnitTestCase
public function testAggregateFunctionParser()
{
$q = new Doctrine_Query();
$func = $q->parseAggregateFunction('SUM(i.price)');
$func = $q->from('QueryTest_Item i')->parseFunctionExpression('SUM(i.price)');
$this->assertEqual($func, 'SUM(i.price)');
}
public function testAggregateFunctionParser2()
{
$q = new Doctrine_Query();
$func = $q->parseAggregateFunction('SUM(i.price * i.quantity)');
$func = $q->from('QueryTest_Item i')->parseFunctionExpression('SUM(i.price * i.quantity)');
$this->assertEqual($func, 'SUM(i.price * i.quantity)');
}
public function testAggregateFunctionParser3()
{
$q = new Doctrine_Query();
$func = $q->parseAggregateFunction('MOD(i.price, i.quantity)');
$func = $q->from('QueryTest_Item i')->parseFunctionExpression('MOD(i.price, i.quantity)');
$this->assertEqual($func, 'MOD(i.price, i.quantity)');
}
public function testAggregateFunctionParser4()
{
$q = new Doctrine_Query();
$func = $q->parseAggregateFunction('CONCAT(i.price, i.quantity)');
$func = $q->from('QueryTest_Item i')->parseFunctionExpression('CONCAT(i.price, i.quantity)');
$this->assertEqual($func, 'CONCAT(i.price, i.quantity)');
}