final class Error extends \Exception
{
public function __construct(
string $message = '',
public readonly string $details = '',
) {
parent::__construct($message);
}
}
Expect::exception(new Error(
message: 'Invalid message fails the test',
details: 'Invalid details do not fail the test :(',
));