\PHPUnit_Framework_ExceptionWrapper
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.
- Author: Daniel F. Kudwien <sun@unleashedmind.com>
- Copyright: 2001-2014 Sebastian Bergmann <sebastian@phpunit.de>
- License: http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
Synopsis
- // members
- protected string $classname;
- protected PHPUnit_Framework_ExceptionWrapper|null $previous;
- // Inherited members from PHPUnit_Framework_Exception
- protected array $serializableTrace;
- // Inherited members from RuntimeException
- protected $message;
- protected $code;
- protected $file;
- protected $line;
- // Inherited members from Exception
- protected $message;
- protected $code;
- protected $file;
- protected $line;
- // methods
- public void __construct()
- public string getClassname()
- public PHPUnit_Framework_ExceptionWrapper getPreviousWrapped()
- public string __toString()
- // Inherited methods from PHPUnit_Framework_Exception
- public void __construct()
- public array getSerializableTrace()
- public string __toString()
- public void __sleep()
- // Inherited methods from RuntimeException
- public final string getMessage()
- public final Exception getPrevious()
- public final mixed getCode()
- public final string getFile()
- public final int getLine()
- public final array getTrace()
- public final string getTraceAsString()
- public string __toString()
- // Inherited methods from Exception
- public void __construct()
- public final string getMessage()
- public final Exception getPrevious()
- public final mixed getCode()
- public final string getFile()
- public final int getLine()
- public final array getTrace()
- public final string getTraceAsString()
- public string __toString()
Hierarchy
Extends
Violations
PHPMessDetector
Line | Rule | Message |
---|---|---|
86 | UnusedLocalVariable | Avoid unused local variables such as '$call'. |
Members
protected
- $classname — string
- $code
—
int
The exception code - $code
—
int
The exception code - $file
—
string
The filename where the exception was created - $file
—
string
The filename where the exception was created - $line
—
int
The line where the exception was created - $line
—
int
The line where the exception was created - $message
—
string
The exception message - $message
—
string
The exception message - $previous — PHPUnit_Framework_ExceptionWrapper|null
- $serializableTrace — array
Methods
public
Inherited from PHPUnit_Framework_Exception
public
- __sleep()
- __toString()
- getSerializableTrace() — Returns the serializable trace (without 'args').
Inherited from RuntimeException
public
Inherited from Exception
public
- __toString() — String representation of the exception
- getCode() — Gets the Exception code
- getFile() — Gets the file in which the exception occurred
- getLine() — Gets the line in which the exception occurred
- getMessage() — Gets the Exception message
- getPrevious() — Returns previous Exception
- getTrace() — Gets the stack trace
- getTraceAsString() — Gets the stack trace as a string
History
-
2014-08-17T09:59:50+02:00 (commit #f40b290)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix @since annotations
-
2014-07-27T20:34:09+02:00 (commit #3cd8e61)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Fixed versions numbers from 6529e40 (refs #1352).
-
2014-07-26T23:07:01+02:00 (commit #1aefe3a)
Author: sun (sun@unleashedmind.com) / Commiter: sun (sun@unleashedmind.com)
Fixed PDOException::getCode() string vs. int mismatch.
-
2014-07-26T23:04:49+02:00 (commit #6529e40)
Author: sun (sun@unleashedmind.com) / Commiter: sun (sun@unleashedmind.com)
Fix #1351: Isolated TestResult contains serialized test class upon failure.
-
2014-01-22T19:43:07+01:00 (commit #02b42d7)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Initial work on formatting code according to PSR-2
-
2014-01-20T17:21:13+01:00 (commit #3a5808f)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Cleanup
-
2014-01-09T08:11:47+01:00 (commit #205e008)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year
-
2013-09-04T06:29:36+02:00 (commit #c07b181)
Author: Jeff Welch (whatthejeff@gmail.com) / Commiter: Jeff Welch (whatthejeff@gmail.com)
Fixes #991 Removed: * `@outputBuffering` * `PHPUnit_Framework_TestCase::setUseOutputBuffering()` * `PHPUnit_Util_Test::getOutputBufferingSettings()`
-
2013-01-07T11:37:52+01:00 (commit #c517984)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year
-
2012-09-24T06:47:44+02:00 (commit #81ab540)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Do not perform string replacement for @package_version@ anymore.
-
2012-04-30T12:02:38+02:00 (commit #5786e50)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
List The BSD 3-Clause License correctly and consistently. Thanks to Christian Aistleitner <christian@quelltextlich.at> for bringing this issue to my attention.
-
2012-01-01T11:21:16+01:00 (commit #aae6c38)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2011-12-27T10:21:52+01:00 (commit #37cacc9)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
PHPUnit no longer throws exceptions that do not extend PHPUnit_Framework_Exception.
-
2010-12-31T11:45:34+01:00 (commit #bee3344)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2010-08-17T06:10:07+02:00 (commit #7835ab2)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fix whitespace.
-
2010-08-17T06:09:35+02:00 (commit #12713ff)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Close #7.
-
2010-07-07T12:42:23+02:00 (commit #f0d9cdd)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Change email address.
-
2010-06-12T20:25:54+02:00 (commit #d19a737)
Author: Mark Story (mark@mark-story.com) / Commiter: Mark Story (mark@mark-story.com)
Removing trailing whitespace from files. Refs #1063
-
2010-04-05T17:41:26+02:00 (commit #471d69e)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Add @subpackage annotation.
-
2010-02-02T14:14:29+01:00 (commit #bc1aaaa)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Remove closing PHP tags.
-
2010-01-19T09:39:03+01:00 (commit #fb48a69)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Initial work on autoloading.
-
2009-12-31T09:26:09+01:00 (commit #37f75ff)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2009-12-31T09:25:53+01:00 (commit #bddcc5f)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2009-12-31T09:23:37+01:00 (commit #7a7d0b7)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2009-12-25T10:32:26+01:00 (commit #60e7125)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Remove Subversion keywords.
-
2009-12-25T10:30:57+01:00 (commit #42294ad)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Remove Subversion keywords.
-
2009-12-25T10:26:35+01:00 (commit #8617133)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Remove Subversion keywords.
-
2009-11-23T09:39:24+01:00 (commit #1503412)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [5389].
-
2009-11-23T09:29:23+01:00 (commit #4c9cf4e)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Initial work on PHP_CodeCoverage migration.
-
2009-08-29T07:48:59+02:00 (commit #d2f7448)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [4132].
-
2009-03-28T12:55:12+01:00 (commit #35fda23)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [4741].
-
2009-03-28T12:54:26+01:00 (commit #aa763bf)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Change how test case names are displayed.
-
2009-03-01T16:29:08+01:00 (commit #21a5cc6)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [4698], [4699], and [4700].
-
2009-03-01T00:17:17+01:00 (commit #b3d3eb5)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Revise [4674].
-
2009-02-26T07:00:55+01:00 (commit #6105eaa)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [4687].
-
2009-02-26T07:00:01+01:00 (commit #0944b45)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Support input from multiple dependencies.
-
2009-02-25T11:19:22+01:00 (commit #0568e0e)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [4674].
-
2009-02-25T11:17:13+01:00 (commit #bc67dd8)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Implement fixture reuse based on test dependencies.
-
2008-12-31T10:26:51+01:00 (commit #a899cb2)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [4402].
-
2008-12-31T10:25:57+01:00 (commit #4b26cea)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2008-11-24T19:09:29+01:00 (commit #4087880)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Do not conditionally declare classes.
-
2008-06-08T14:22:29+02:00 (commit #191a5d5)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [3160].
-
2008-06-08T14:03:37+02:00 (commit #9d9b5e3)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Drop superfluous annotations.
-
2007-12-26T19:11:55+01:00 (commit #1bba1cc)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2007-12-26T19:11:04+01:00 (commit #58121cf)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump copyright year.
-
2007-10-13T17:53:53+02:00 (commit #675e9df)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [1391].
-
2007-10-12T21:54:16+02:00 (commit #aeb4895)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [1389].
-
2007-09-29T12:56:13+02:00 (commit #8feea89)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Merge [1361].
-
2007-02-24T07:58:18+01:00 (commit #203ee10)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fugbix typo.
-
2007-02-24T07:58:18+01:00 (commit #ae2a7c2)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Fugbix typo.
-
2006-12-24T18:50:40+01:00 (commit #0189be1)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Bump year.
-
2006-09-24T18:38:00+02:00 (commit #2b70970)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Add getMessage().
-
2006-09-20T11:57:47+02:00 (commit #940d55f)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Do not trigger __autoload() for class_exists().
-
2006-09-11T09:20:41+02:00 (commit #75e12fb)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
No longer needed.
-
2006-08-13T10:57:58+02:00 (commit #3cd6a25)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Whitespace fixes.
-
2006-07-06T11:50:42+02:00 (commit #dacd2f1)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Leftover: PHPUnit2 -> PHPUnit.
-
2006-06-30T10:38:41+02:00 (commit #210b621)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Make it easier to use a checkout of the trunk.
-
2006-06-29T20:56:08+02:00 (commit #6b0d2d5)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Post-PEAR cleanup, phase one: PHPUnit2_* -> PHPUnit_*, pear.php.net -> phpunit.de, etc.
-
2006-06-29T16:58:01+02:00 (commit #8b8c705)
Author: Sebastian Bergmann (sb@sebastian-bergmann.de) / Commiter: Sebastian Bergmann (sb@sebastian-bergmann.de)
Recreate trunk.