Laravel - HTTP Tests - Assert Session Has Input

Assert that the session has a given value in the flashed input array:

    
    $response->assertSessionHasInput($key, $value = null);
	

If needed, a closure can be provided as the second argument to the assertSessionHasInput method. The assertion will pass if the closure returns true:

    
    $response->assertSessionHasInput($key, function ($value) {
        return Crypt::decryptString($value) === 'secret';
    });