sebastianbergmann/phpunit-documentation

writing test for exceptions example fails on documentation

lcjury opened this issue · 1 comments

The [Testing Exceptions] (https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.exceptions.examples.ExceptionTest.php) example fails

phpunit ExceptionTest
PHPUnit 6.0.0 by Sebastian Bergmann and contributors.

F

Time: 0 seconds, Memory: 4.75Mb

There was 1 failure:

  1. ExceptionTest::testException
    Expected exception InvalidArgumentException

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

It would be awesome to include an example with throw new InvalidArgumentException() to show how it should be used

Most examples fail to show what the failure message looks like.