X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fphpunit%2Fphpunit%2Ftests%2F_files%2FExceptionStackTest.php;fp=vendor%2Fphpunit%2Fphpunit%2Ftests%2F_files%2FExceptionStackTest.php;h=05fa878feadc63f51338a278b710461f169b9e2f;hp=0000000000000000000000000000000000000000;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae diff --git a/vendor/phpunit/phpunit/tests/_files/ExceptionStackTest.php b/vendor/phpunit/phpunit/tests/_files/ExceptionStackTest.php new file mode 100644 index 000000000..05fa878fe --- /dev/null +++ b/vendor/phpunit/phpunit/tests/_files/ExceptionStackTest.php @@ -0,0 +1,21 @@ +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); + } + } + + public function testNestedExceptions() + { + $exceptionThree = new Exception('Three'); + $exceptionTwo = new InvalidArgumentException('Two', 0, $exceptionThree); + $exceptionOne = new Exception('One', 0, $exceptionTwo); + throw $exceptionOne; + } +}