You are here

public static function PHPUnit_Framework_TestCase::throwException in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Framework/TestCase.php \PHPUnit_Framework_TestCase::throwException()

@since Method available since Release 3.1.0

Parameters

Exception $exception:

Return value

PHPUnit_Framework_MockObject_Stub_Exception

1 call to PHPUnit_Framework_TestCase::throwException()
Framework_MockObjectTest::testStubbedException in vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php

File

vendor/phpunit/phpunit/src/Framework/TestCase.php, line 1681

Class

PHPUnit_Framework_TestCase
A TestCase defines the fixture to run multiple tests.

Code

public static function throwException(Exception $exception) {
  return new PHPUnit_Framework_MockObject_Stub_Exception($exception);
}