public function testCallback() { $this->viewFactory->shouldReceive('make')->withArgs(['fooScript', ['id' => 'fooBar', 'columns' => ['id' => 'id'], 'options' => [], 'callbacks' => ['fooBar' => 'fooBar', 'fooBar1' => ['fooBar']], 'endpoint' => '/']])->times(1)->andReturn($this->view); $this->dtv2->callback('fooBar', 'fooBar'); $this->dtv2->callback('fooBar1', ['fooBar']); $this->dtv2->script(); }