Skip to content

Commit

Permalink
Added some tests for where clauses supplied as arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Mar 3, 2013
1 parent 65cebfe commit 71315ee
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/QueryWhereTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public function testAndWhere()
public function testOrWhere()
{
$this->query->where('name', 'John')
->orWhere('name', 'Steve');
->orWhere('name', 'Steve')
->orWhere(array('name' => 'Jack', 'surname' => 'Johnes'));

$expected = array(
'$or' => array(
Expand All @@ -96,6 +97,16 @@ public function testOrWhere()
'$and' => array(
array('name' => 'Steve'),
)
),
array(
'$and' => array(
array('name' => 'Jack'),
)
),
array(
'$and' => array(
array('surname' => 'Johnes'),
)
)
)
);
Expand Down

0 comments on commit 71315ee

Please sign in to comment.