file-fetcher
Public Member Functions | Protected Attributes | List of all members
PHPUnit\Framework\Exception Class Reference
Inheritance diagram for PHPUnit\Framework\Exception:
PHPUnit\Exception PHPUnit\Framework\AssertionFailedError PHPUnit\Framework\CodeCoverageException PHPUnit\Framework\Error\Error PHPUnit\Framework\ExceptionWrapper PHPUnit\Framework\InvalidArgumentException PHPUnit\Framework\InvalidDataProviderException PHPUnit\Framework\InvalidParameterGroupException PHPUnit\Framework\MockObject\ConfigurableMethodsAlreadyInitializedException PHPUnit\Framework\MockObject\IncompatibleReturnValueException PHPUnit\Framework\NoChildTestSuiteException PHPUnit\Framework\Warning

Detailed Description

Base class for all PHPUnit Framework exceptions.

Ensures that exceptions thrown during a test run do not leave stray references behind.

Every Exception contains a stack trace. Each stack frame contains the 'args' of the called function. The function arguments can contain references to instantiated objects. The references prevent the objects from being destructed (until test results are eventually printed), so memory cannot be freed up.

With enabled process isolation, test results are serialized in the child process and unserialized in the parent process. The stack trace of Exceptions may contain objects that cannot be serialized or unserialized (e.g., PDO connections). Unserializing user-space objects from the child process into the parent would break the intended encapsulation of process isolation.

See also
http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions

Public Member Functions

 __construct ($message='', $code=0, \Throwable $previous=null)
 
 __toString ()
 
 __sleep ()
 
 getSerializableTrace ()
 

Protected Attributes

 $serializableTrace
 

Constructor & Destructor Documentation

◆ __construct()

PHPUnit\Framework\Exception::__construct (   $message = '',
  $code = 0,
\Throwable  $previous = null 
)

Member Function Documentation

◆ __sleep()

PHPUnit\Framework\Exception::__sleep ( )

◆ __toString()

PHPUnit\Framework\Exception::__toString ( )

◆ getSerializableTrace()

PHPUnit\Framework\Exception::getSerializableTrace ( )

Returns the serializable trace (without 'args').

Member Data Documentation

◆ $serializableTrace

PHPUnit\Framework\Exception::$serializableTrace
protected

The documentation for this class was generated from the following file: