Hello may I have some help on that?
I have the following Laravel Controller:
namespace App\Controller
use App\Jobs\MyJob;
class JobDispatchControler
{
public function callJob(Request $request)
{
MyJob::dispatch();
}
}
The controller above has the following route:
Route::get('/job',"\App\Controller\JobDispatchControler@callJob");
And I want to test whether I a call to the /job
will dispatch the MyJob
job:
namespace Test\App\MyJob;
use Illuminate\Foundation\Testing\TestCase;
…