@@ -234,10 +234,10 @@ public function testPull()
234234 public function testDistinct ()
235235 {
236236 DB ::collection ('items ' )->insert (array (
237- array ('name ' => 'knife ' , 'type ' => 'sharp ' , ' amount ' => 34 ),
238- array ('name ' => 'fork ' , 'type ' => 'sharp ' , ' amount ' => 20 ),
239- array ('name ' => 'spoon ' , 'type ' => 'round ' , ' amount ' => 3 ),
240- array ('name ' => 'spoon ' , 'type ' => 'round ' , ' amount ' => 14 )
237+ array ('name ' => 'knife ' , 'type ' => 'sharp ' ,),
238+ array ('name ' => 'fork ' , 'type ' => 'sharp ' ),
239+ array ('name ' => 'spoon ' , 'type ' => 'round ' ),
240+ array ('name ' => 'spoon ' , 'type ' => 'round ' )
241241 ));
242242
243243 $ items = DB ::collection ('items ' )->distinct ('name ' )->get ();
@@ -260,6 +260,14 @@ public function testCustomId()
260260
261261 $ item = DB ::collection ('items ' )->where ('_id ' , 'fork ' )->first ();
262262 $ this ->assertEquals ('fork ' , $ item ['_id ' ]);
263+
264+ DB ::collection ('users ' )->insert (array (
265+ array ('_id ' => 1 , 'name ' => 'Jane Doe ' ),
266+ array ('_id ' => 2 , 'name ' => 'John Doe ' )
267+ ));
268+
269+ $ item = DB ::collection ('users ' )->find (1 );
270+ $ this ->assertEquals (1 , $ item ['_id ' ]);
263271 }
264272
265273 public function testTake ()
0 commit comments