mercredi 28 septembre 2016

Failed asserting that Illuminate\Http\Response Object (...) is an instance of class "Illuminate\Http\RedirectResponse"

Controller code:

return redirect()->route('admin.patient.edit', $patientId);

Test code:

$this->visit(route('admin.patient.edit', $this->patient->id)) ->press('Update');

$this->assertRedirectedToRoute('admin.patient.edit', [$this->patient->id]);

The error I get is this:

Failed asserting that Illuminate\Http\Response Object (...) is an instance of class "Illuminate\Http\RedirectResponse".

I've printed out the response from the inside the test and inside the controller and it is in fact a RedirectReponse Object. Any ideas?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2cB5j3n
via IFTTT

Aucun commentaire:

Enregistrer un commentaire