diff --git a/Tests/dblayerooComplet.php b/Tests/dblayerooComplet.php index 627098d..38639bd 100644 --- a/Tests/dblayerooComplet.php +++ b/Tests/dblayerooComplet.php @@ -550,6 +550,7 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase ->displayAdd ("group") ->joinLeft ($tbl2, array ("group"=>"group")) ->orderAdd ("group", "ASC") +->debug (1) ->execute (); $tbl1->disconnect (); $tbl2->disconnect (); @@ -930,8 +931,30 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase $tbl1 = $this->tbl1 (); $tbl1->displayAdd ("group_concat (group ),group ", "Group Alias,Group2"); + // PGSQL generate an exception : + // function string_agg(character varying) does not exist + if ($this->engine === "pgsql") + $this->setExpectedException ("PDOException"); $res = $tbl1->select () ->execute (); $tbl1->disconnect (); + if ($this->engine !== "pgsql") + $this->assertSame (array ( + array ('Group Alias' => 'group1', + 'Group2' => 'group1',), + array ('Group Alias' => 'group2', + 'Group2' => 'group2',), + ), $res); + } + + public function test_displayAdd_DISTINCT1 () + { + $tbl1 = $this->tbl1 (); + $res = $tbl1->select () + ->displayAdd ("distinct where", "ALIAS") + ->execute (); + $tbl1->disconnect (); + $this->assertSame (array (0=>array ("ALIAS"=>"where2")), + $res); } }