DEF STUDIO srl

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]);
Edit this page
Last updated 10 September 2024