'laravel testing how to remove some failed output?

I am testing some apis with laravel 8.

When a test is OK, I see this result :

enter image description here

It is clear, concise. Perfect !

When a test is KO, I would like to have an equivalent result, without the detail of the problem :

enter image description here

I tried a lot of options (--quiet, -v -vv -vvv) without success. Is it possible to obtain this kind of result ?



Solution 1:[1]

Add $this->withoutExceptionHandling(); on top your testmethods.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Maik Lowrey