public static function 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 drupal/core/vendor/phpunit/phpunit-mock-objects/Tests/MockObjectTest.php

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php, line 1636

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);
}