@@ -28,7 +28,7 @@ public function test_it_can_paginate()
2828 $ this ->makeUser ($ this ->ou )->save ();
2929 }
3030
31- $ this ->assertCount (10 , User::paginate (5 ));
31+ $ this ->assertCount (10 , User::in ( $ this -> ou )-> paginate (5 ));
3232 }
3333
3434 public function test_it_can_chunk ()
@@ -39,7 +39,7 @@ public function test_it_can_chunk()
3939
4040 $ pages = 0 ;
4141
42- User::chunk (5 , function (Collection $ results ) use (&$ pages ) {
42+ User::in ( $ this -> ou )-> chunk (5 , function (Collection $ results ) use (&$ pages ) {
4343 $ pages ++;
4444
4545 $ this ->assertCount (5 , $ results );
@@ -56,7 +56,7 @@ public function test_it_cannot_override_limit_when_chunking()
5656
5757 $ pages = 0 ;
5858
59- User::limit (1 )->chunk (5 , function (Collection $ results ) use (&$ pages ) {
59+ User::in ( $ this -> ou )-> limit (1 )->chunk (5 , function (Collection $ results ) use (&$ pages ) {
6060 $ pages ++;
6161
6262 $ this ->assertCount (5 , $ results );
@@ -71,8 +71,8 @@ public function test_it_returns_no_results_with_empty_where_in_array()
7171
7272 $ user ->save ();
7373
74- $ this ->assertCount (1 , User::get ());
75- $ this ->assertCount (1 , User::whereIn ('cn ' , [$ user ->getFirstAttribute ('cn ' )])->get ());
76- $ this ->assertEmpty (User::whereIn ('cn ' , [])->get ());
74+ $ this ->assertCount (1 , User::in ( $ this -> ou )-> get ());
75+ $ this ->assertCount (1 , User::in ( $ this -> ou )-> whereIn ('cn ' , [$ user ->getFirstAttribute ('cn ' )])->get ());
76+ $ this ->assertEmpty (User::in ( $ this -> ou )-> whereIn ('cn ' , [])->get ());
7777 }
7878}
0 commit comments