class ExceptionWrapper extends Exception (View source)

Wraps Exceptions thrown by code under test.

Re-instantiates Exceptions thrown by user-space code to retain their original class names, properties, and stack traces (but without arguments).

Unlike PHPUnit\Framework_\Exception, the complete stack of previous Exceptions is processed.

Properties

protected array $serializableTrace from Exception
protected string $className
protected ExceptionWrapper|null $previous

Methods

__construct(Throwable $t)

No description

array
getSerializableTrace()

Returns the serializable trace (without 'args').

from Exception
string
__toString()

No description

__sleep()

No description

from Exception
string
getClassName()

No description

Details

__construct(Throwable $t)

Parameters

Throwable $t

array getSerializableTrace()

Returns the serializable trace (without 'args').

Return Value

array

string __toString()

Return Value

string

__sleep()

string getClassName()

Return Value

string

ExceptionWrapper getPreviousWrapped()

Return Value

ExceptionWrapper