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

Commit

Permalink
Use driver's return value in Collection::batchInsert() (closes #93)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikola committed Apr 23, 2013
1 parent e92f0f2 commit 773423a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Doctrine/MongoDB/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public function batchInsert(array &$a, array $options = array())
$this->eventManager->dispatchEvent(Events::postBatchInsert, new EventArgs($this, $result));
}

return $a;
return $result;
}

protected function doBatchInsert(array &$a, array $options = array())
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/MongoDB/Tests/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function testBatchInsert()

$coll = $this->getTestCollection($this->getMockConnection(), $mongoCollection);

$this->assertEquals($docs, $coll->batchInsert($docs, $options));
$this->assertTrue($coll->batchInsert($docs, $options));
}

public function testUpdate()
Expand Down

0 comments on commit 773423a

Please sign in to comment.