@@ -132,45 +132,45 @@ public function it_can_sort_case_insensitive_strings()
132132
133133 /** @test */
134134 public function it_can_sort_numeric_strings ()
135- {
136- config ()->set ('app.debug ' , false );
137- request ()->merge ([
138- 'columns ' => [
139- ['data ' => 'amount ' , 'name ' => 'amount ' , 'searchable ' => 'true ' , 'orderable ' => 'true ' ],
140- ],
141- 'order ' => [['column ' => 0 , 'dir ' => 'asc ' ]],
142- 'start ' => 0 ,
143- 'length ' => 10 ,
144- 'draw ' => 1 ,
145- ]);
146-
147- $ collection = collect ([
148- ['amount ' => '12 ' ],
149- ['amount ' => '7 ' ],
150- ['amount ' => '-8 ' ],
151- ['amount ' => '0 ' ],
152- ['amount ' => '-3 ' ],
153- ['amount ' => '8 ' ],
154- ]);
155-
156- $ dataTable = app ('datatables ' )->collection ($ collection );
157- /** @var JsonResponse $response */
158- $ response = $ dataTable ->toJson ();
159-
160- $ this ->assertEquals ([
161- 'draw ' => 1 ,
162- 'recordsTotal ' => 6 ,
163- 'recordsFiltered ' => 6 ,
164- 'data ' => [
165- ['amount ' => '-8 ' ],
166- ['amount ' => '-3 ' ],
167- ['amount ' => '0 ' ],
168- ['amount ' => '7 ' ],
169- ['amount ' => '8 ' ],
170- ['amount ' => '12 ' ],
171- ],
172- ], $ response ->getData (true ));
173- }
135+ {
136+ config ()->set ('app.debug ' , false );
137+ request ()->merge ([
138+ 'columns ' => [
139+ ['data ' => 'amount ' , 'name ' => 'amount ' , 'searchable ' => 'true ' , 'orderable ' => 'true ' ],
140+ ],
141+ 'order ' => [['column ' => 0 , 'dir ' => 'asc ' ]],
142+ 'start ' => 0 ,
143+ 'length ' => 10 ,
144+ 'draw ' => 1 ,
145+ ]);
146+
147+ $ collection = collect ([
148+ ['amount ' => '12 ' ],
149+ ['amount ' => '7 ' ],
150+ ['amount ' => '-8 ' ],
151+ ['amount ' => '0 ' ],
152+ ['amount ' => '-3 ' ],
153+ ['amount ' => '8 ' ],
154+ ]);
155+
156+ $ dataTable = app ('datatables ' )->collection ($ collection );
157+ /** @var JsonResponse $response */
158+ $ response = $ dataTable ->toJson ();
159+
160+ $ this ->assertEquals ([
161+ 'draw ' => 1 ,
162+ 'recordsTotal ' => 6 ,
163+ 'recordsFiltered ' => 6 ,
164+ 'data ' => [
165+ ['amount ' => '-8 ' ],
166+ ['amount ' => '-3 ' ],
167+ ['amount ' => '0 ' ],
168+ ['amount ' => '7 ' ],
169+ ['amount ' => '8 ' ],
170+ ['amount ' => '12 ' ],
171+ ],
172+ ], $ response ->getData (true ));
173+ }
174174
175175 /** @test */
176176 public function it_accepts_a_model_using_ioc_container_factory ()
0 commit comments