dblayeroo : Add displayAdd empty tests
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5262 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -506,6 +506,84 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase
|
|||||||
), $res);
|
), $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 ()
|
public function test_leftJoin2 ()
|
||||||
{
|
{
|
||||||
// No filter
|
// No filter
|
||||||
|
|||||||
Reference in New Issue
Block a user