You are here

public function ExceptionStackTest::testPrintingChildException in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpunit/phpunit/tests/_files/ExceptionStackTest.php \ExceptionStackTest::testPrintingChildException()

File

vendor/phpunit/phpunit/tests/_files/ExceptionStackTest.php, line 4

Class

ExceptionStackTest

Code

public function testPrintingChildException() {
  try {
    $this
      ->assertEquals(array(
      1,
    ), array(
      2,
    ), 'message');
  } catch (PHPUnit_Framework_ExpectationFailedException $e) {
    $message = $e
      ->getMessage() . $e
      ->getComparisonFailure()
      ->getDiff();
    throw new PHPUnit_Framework_Exception("Child exception\n{$message}", 101, $e);
  }
}