Vistas

Comprueban si una vista existe (View::exists()), sin renderizarla ni hacer una petición.

$this->assertViewExists('posts.index');
$this->assertViewExists('admin::dashboard');
$this->assertViewNotExists('posts.legacy');
Método Argumentos
assertViewExists string $view, string $message = ''
assertViewNotExists string $view, string $message = ''

Mensajes al fallar:

The [posts.show] view should exist.
The [posts.legacy] view should not exist.

Nota

Para comprobar qué vista devolvió una respuesta, usa $response->assertViewIs('posts.index') de Laravel.