Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Commit

Permalink
Add more tests for Query\Builder::select()/exclude() (empty array)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Durand committed Mar 29, 2013
1 parent 412f9e0 commit 0f50145
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/Doctrine/MongoDB/Tests/Query/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 0f50145

Please sign in to comment.