@@ -23,32 +23,6 @@ public function tearDown()
23
23
m::close ();
24
24
}
25
25
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
-
52
26
public function test_datatables_make_with_data ()
53
27
{
54
28
$ cache = m::mock ('stdClass ' );
@@ -81,7 +55,7 @@ public function test_datatables_make_with_data()
81
55
$ builder ->getConnection ()->shouldReceive ('table ' )->times (2 )->andReturn ($ builder );
82
56
$ builder ->shouldReceive ('getBindings ' )->times (2 )->andReturn (array ());
83
57
$ 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);
85
59
$ builder ->shouldReceive ('count ' )->times (2 )->andReturn (2 );
86
60
87
61
Config::shouldReceive ('get ' );
@@ -129,7 +103,7 @@ public function test_datatables_make_with_data_overriding_filter()
129
103
$ builder ->getConnection ()->shouldReceive ('table ' )->times (2 )->andReturn ($ builder );
130
104
$ builder ->shouldReceive ('getBindings ' )->times (2 )->andReturn (array ());
131
105
$ 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);
133
107
$ builder ->shouldReceive ('count ' )->times (2 )->andReturn (2 );
134
108
135
109
Config::shouldReceive ('get ' );
@@ -181,7 +155,7 @@ public function test_datatables_make_with_data_and_uses_mdata()
181
155
$ builder ->getConnection ()->shouldReceive ('table ' )->times (2 )->andReturn ($ builder );
182
156
$ builder ->shouldReceive ('getBindings ' )->times (2 )->andReturn (array ());
183
157
$ 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);
185
159
$ builder ->shouldReceive ('count ' )->times (2 )->andReturn (2 );
186
160
187
161
Config::shouldReceive ('get ' );
0 commit comments