/**
  * A basic functional test example.
  *
  * @return void
  */
 public function test_task_init()
 {
     $task = \TPTaskRunner\Models\Task::createTaskWithData('Class', ['string' => 'data']);
     $task->save();
     /** @var \TPTaskRunner\Models\Task $task_load */
     $task_load = \TPTaskRunner\Models\Task::findOrFail($task->id);
     $this->assertNotNull($task_load);
     $o = $task_load->getJSONData();
     $this->assertNotNull($o);
     $this->assertEquals('data', $o->string);
 }
 /**
  * Erzeugt einen Job für den Task
  * @param $id
  * @return \Illuminate\Http\JsonResponse
  */
 public function run($id)
 {
     $task = Task::findOrFail($id);
     $force_value = Input::get('force', false);
     $rv = $task->run($force = $force_value);
     return response()->json(['run' => $rv]);
 }