Skip to content

Commit b31f54a

Browse files
committed
Updated tests for mongodb#414
1 parent 08ac5b3 commit b31f54a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/QueryBuilderTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ public function testPush()
240240
$user = DB::collection('users')->find($id);
241241
$this->assertEquals(4, count($user['tags']));
242242
$this->assertEquals(2, count($user['messages']));
243+
244+
DB::collection('users')->where('_id', $id)->push(array('messages' => array('date' => new MongoDate(), 'body' => 'Hi John')));
245+
$user = DB::collection('users')->find($id);
246+
$this->assertEquals(3, count($user['messages']));
243247
}
244248

245249
public function testPull()

0 commit comments

Comments
 (0)