diff --git a/Tests/dblayerooComplet.php b/Tests/dblayerooComplet.php index f1d015b..b80d81a 100644 --- a/Tests/dblayerooComplet.php +++ b/Tests/dblayerooComplet.php @@ -974,7 +974,7 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase ), $res); } - public function test_displayAdd_MAX1 () + public function test_displayAdd_MAX_GROUPBY1 () { $tbl2 = $this->tbl2 (); $res = $tbl2->select () @@ -991,7 +991,7 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase $res); } - public function test_displayAdd_MAX2 () + public function test_displayAdd_MAX_GROUPBY2 () { $tbl2 = $this->tbl2 (); $res = $tbl2->select () @@ -1000,4 +1000,22 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase $tbl2->disconnect (); $this->assertSame (array (array ('MAX(uid)' => 6)), $res); } + + public function test_displayAdd_MAX_GROUPBY3 () + { + $tbl1 = $this->tbl1 (); + $tbl2 = $this->tbl2 (); + $tbl1->select () + ->displayAdd ("group"); + $res = $tbl2->select () + ->displayAdd ("MAX(uid)") + ->joinInner ($tbl1, array ("group"=>"group")) +->debug (1) + ->execute (); + $tbl2->disconnect (); + $this->assertSame (array (array ( + 'groupedoo.group' => 'group1', + 'MAX(usersoo.uid)' => 6, + )), $res); + } }