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

Commit

Permalink
Add unit test for Query\Builder::select()
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Durand committed Mar 29, 2013
1 parent ac94f9a commit 20bdf16
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Doctrine/MongoDB/Tests/Query/BuilderTest.php
Expand Up @@ -514,6 +514,18 @@ public function testWithinPolygonRequiresAtLeastThreePoints()
->field('loc')->withinPolygon(array(0, 0), array(1, 1));
}

public function testSelect()
{
$qb = $this->getTestQueryBuilder()
->select('foo', 'bar');

$expected = array(
'foo' => 1,
'bar' => 1
);
$this->assertEquals($expected, $qb->debug('select'));
}

private function getTestQueryBuilder()
{
return $this->conn->selectCollection('db', 'users')->createQueryBuilder();
Expand Down

0 comments on commit 20bdf16

Please sign in to comment.