increments('id'); $table->string('name'); }); Demo::insert(array('name'=>'demo datatables')); } public function tearDown() { Schema::dropIfExists('demos'); } public function test_demo_count() { $this->assertEquals(1, Demo::count()); } public function test_datatables_make_function() { $demo = DB::table('demos')->select('id','name'); $output = Datatables::of($demo)->make(); $this->assertInstanceOf('Illuminate\Http\JsonResponse', $output); } }