dblayeroo: Add alias support (AS) to displayAdd

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3821 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-07-20 13:21:17 +00:00
parent 5223b529d1
commit 643bce947a
2 changed files with 50 additions and 3 deletions

View File

@@ -744,6 +744,19 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase
$db1->sep()."group".$db1->sep().")"), $res);
}
public function test_displayAdd_NotFull5 ()
{
// With alias
$db1 = $this->db1 ();
$db1->displayAdd ("group_concat (distinct group ) ", "Group Alias");
$res = $db1->displayGet ();
$db1->disconnect ();
$this->assertSame (array (
"order1" => "GROUP_CONCAT(DISTINCT ".
$db1->sep()."group".$db1->sep().") AS ".
$db1->sep()."Group Alias".$db1->sep()), $res);
}
public function test_displayAdd_Full1 ()
{
$db1 = $this->db1 ();
@@ -790,6 +803,20 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase
$db1->sep()."group".$db1->sep().")"), $res);
}
public function test_displayAdd_Full5 ()
{
// With alias
$db1 = $this->db1 ();
$db1->displayAdd ("group_concat (distinct group ) ", "Group Alias");
$res = $db1->displayGet (true);
$db1->disconnect ();
$this->assertSame (array (
"order1" => "GROUP_CONCAT(DISTINCT ".
$db1->sep()."groupedoo".$db1->sep().".".
$db1->sep()."group".$db1->sep().") AS ".
$db1->sep()."Group Alias".$db1->sep()), $res);
}
public function test_displayAdd_Multiple1 ()
{
$db1 = $this->db1 ();