From 3662420339f6bc9e73c24527d37ab40912b6f69f Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Fri, 10 May 2019 11:06:10 +0000 Subject: [PATCH] dblayeroo : Add displayAdd empty tests git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5262 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- Tests/dblayerooComplet.php | 78 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/Tests/dblayerooComplet.php b/Tests/dblayerooComplet.php index 6df19be..33e0039 100644 --- a/Tests/dblayerooComplet.php +++ b/Tests/dblayerooComplet.php @@ -506,6 +506,84 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase ), $res); } + public function test_innerJoin2 () + { + // No filter. Manage the empty displayAdd + $tbl1 = $this->tbl1 (); + $tbl1->displayAdd (); + $tbl2 = $this->tbl2 (); + $res = $tbl2->select () + ->joinInner ($tbl1, array ("group"=>"group")) + ->execute (); + $tbl1->disconnect (); + $tbl2->disconnect (); + $this->assertSame (array ( + array ( + 'uid' => 1, + 'gecos' => 'name', + 'password' => 'toto', + 'group' => 'group1', + ), + array ( + 'uid' => 4, + 'gecos' => 'name2', + 'password' => 'pwd2', + 'group' => 'group1', + ), + array ( + 'uid' => 5, + 'gecos' => 'name3', + 'password' => 'pwd3', + 'group' => 'group1', + ), + array ( + 'uid' => 6, + 'gecos' => 'name4', + 'password' => 'pwd4', + 'group' => 'group1', + ), + ), $res); + } + + public function test_innerJoin3 () + { + // No filter. Manage the empty displayAdd + $tbl1 = $this->tbl1 (); + $tbl2 = $this->tbl2 (); + $tbl2->displayAdd (); + $res = $tbl2->select () + ->joinInner ($tbl1, array ("group"=>"group")) + ->execute (); + $tbl1->disconnect (); + $tbl2->disconnect (); + $this->assertSame (array ( + array ( + 'group' => 'group1', + 'object' => 'object', + 'where' => 'where', + 'with space' => NULL, + ), + array ( + 'group' => 'group1', + 'object' => 'object', + 'where' => 'where', + 'with space' => NULL, + ), + array ( + 'group' => 'group1', + 'object' => 'object', + 'where' => 'where', + 'with space' => NULL, + ), + array ( + 'group' => 'group1', + 'object' => 'object', + 'where' => 'where', + 'with space' => NULL, + ), + ), $res); + } + public function test_leftJoin2 () { // No filter