i have this test for create function of controller
public function createTest()
{
$user = factory(App\User::class)->create([
'email' => 'testuser@arabiaweather.com',
'password' => bcrypt($this->password),
'type' => 'admin'
]);
$this->be($user);
$response = $this->call('GET', '/client/1/profile/2/data');
var_dump($response);
$response->assertViewHas('client', 1);
$response->assertViewHas('clientProfile', 2);
$this->visit('/client/1/profile/2/data/create')
->seePageIs('/client/1/profile/2/data/create');
$this->user->delete();
}
I got this error
Error: Call to undefined method Illuminate\Http\Response::assertViewHas()
how i can solve it?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire