DEF STUDIO srl

Need help with Laravel and web development?

Hire one of our experts for your projects.

We build tailored products, websites and platforms — with care for UX, performance and maintainability.

Booking open for Q4 — limited slots

Views Expectations

toBeView()

Assert that the value is an instance of \Illuminate\View\View with the given name.

expect(view('page'))->toBeView('page');

It can optionally check that the array was given to the view.

expect(view('page')->with('data', 42))
    ->toBeView('page', ['data' => 42]);
Suggest a change
Last updated 22 August 2025