@@ -23,32 +23,6 @@ public function tearDown()
2323 m::close ();
2424 }
2525
26- public function test_datatables_make_response ()
27- {
28- $ cache = m::mock ('stdClass ' );
29- $ driver = m::mock ('stdClass ' );
30-
31- $ builder = $ this ->getBuilder ();
32- $ builder ->select ('id ' ,'name ' )->from ('users ' );
33-
34- $ builder ->getConnection ()->shouldReceive ('raw ' );
35- $ builder ->getConnection ()->shouldReceive ('table ' )->andReturn ($ builder );
36- $ builder ->getConnection ()->shouldReceive ('getName ' )->andReturn ('foo ' );
37- // $builder->getConnection()->shouldReceive('setBindings')->andReturn($builder);
38-
39- $ builder ->getConnection ()->shouldReceive ('getCacheManager ' )->times (3 )->andReturn ($ cache );
40- $ cache ->shouldReceive ('driver ' )->times (3 )->andReturn ($ driver );
41- $ driver ->shouldReceive ('remember ' )->times (3 )->andReturn (array ());
42-
43- // $builder->getConnection()->shouldReceive('count')->andReturn(2);
44-
45- Config::shouldReceive ('get ' );
46-
47- $ response = Datatables::of ($ builder )->make ();
48-
49- $ this ->assertInstanceOf ('Illuminate\Http\JsonResponse ' , $ response );
50- }
51-
5226 public function test_datatables_make_with_data ()
5327 {
5428 $ cache = m::mock ('stdClass ' );
@@ -81,7 +55,7 @@ public function test_datatables_make_with_data()
8155 $ builder ->getConnection ()->shouldReceive ('table ' )->times (2 )->andReturn ($ builder );
8256 $ builder ->shouldReceive ('getBindings ' )->times (2 )->andReturn (array ());
8357 $ builder ->shouldReceive ('setBindings ' )->times (2 )->with (array ())->andReturn ($ builder );
84- $ builder ->shouldReceive ('remember ' )->times (2 )->with (true )->andReturn ($ builder );
58+ // $builder->shouldReceive('remember')->times(2)->with(true)->andReturn($builder);
8559 $ builder ->shouldReceive ('count ' )->times (2 )->andReturn (2 );
8660
8761 Config::shouldReceive ('get ' );
@@ -129,7 +103,7 @@ public function test_datatables_make_with_data_overriding_filter()
129103 $ builder ->getConnection ()->shouldReceive ('table ' )->times (2 )->andReturn ($ builder );
130104 $ builder ->shouldReceive ('getBindings ' )->times (2 )->andReturn (array ());
131105 $ builder ->shouldReceive ('setBindings ' )->times (2 )->with (array ())->andReturn ($ builder );
132- $ builder ->shouldReceive ('remember ' )->times (2 )->with (true )->andReturn ($ builder );
106+ // $builder->shouldReceive('remember')->times(2)->with(true)->andReturn($builder);
133107 $ builder ->shouldReceive ('count ' )->times (2 )->andReturn (2 );
134108
135109 Config::shouldReceive ('get ' );
@@ -181,7 +155,7 @@ public function test_datatables_make_with_data_and_uses_mdata()
181155 $ builder ->getConnection ()->shouldReceive ('table ' )->times (2 )->andReturn ($ builder );
182156 $ builder ->shouldReceive ('getBindings ' )->times (2 )->andReturn (array ());
183157 $ builder ->shouldReceive ('setBindings ' )->times (2 )->with (array ())->andReturn ($ builder );
184- $ builder ->shouldReceive ('remember ' )->times (2 )->with (true )->andReturn ($ builder );
158+ // $builder->shouldReceive('remember')->times(2)->with(true)->andReturn($builder);
185159 $ builder ->shouldReceive ('count ' )->times (2 )->andReturn (2 );
186160
187161 Config::shouldReceive ('get ' );
0 commit comments