Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add more tests for Query\Builder::select()/exclude() (empty array)

  • Loading branch information...
commit 0f5014566861349621ece4fec44a574886ecda75 1 parent 412f9e0
Pierre Durand pierrre authored
Showing with 18 additions and 0 deletions.
  1. +18 −0 tests/Doctrine/MongoDB/Tests/Query/BuilderTest.php
18 tests/Doctrine/MongoDB/Tests/Query/BuilderTest.php
View
@@ -538,6 +538,15 @@ public function testSelectWithArray()
$this->assertEquals($expected, $qb->debug('select'));
}
+ public function testSelectWithEmptyArray()
+ {
+ $qb = $this->getTestQueryBuilder()
+ ->select(array());
+
+ $expected = array();
+ $this->assertEquals($expected, $qb->debug('select'));
+ }
+
public function testSelectWithNothing()
{
$qb = $this->getTestQueryBuilder()
@@ -571,6 +580,15 @@ public function testExcludeWithArray()
$this->assertEquals($expected, $qb->debug('select'));
}
+ public function testExcludeWithEmptyArray()
+ {
+ $qb = $this->getTestQueryBuilder()
+ ->exclude(array());
+
+ $expected = array();
+ $this->assertEquals($expected, $qb->debug('select'));
+ }
+
public function testExcludeWithNothing()
{
$qb = $this->getTestQueryBuilder()
Please sign in to comment.
Something went wrong with that request. Please try again.