Exception.php Interfaces, Classes and Traits PHPUnit_Framework_MockObject_Stub_Exception Stubs a method by raising a user-defined exception.