Skip to content

Commit

Permalink
Remove note that has not been correct for quite a while
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Aug 3, 2019
1 parent 4341497 commit afb3088
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/writing-tests-for-phpunit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -702,13 +702,6 @@ shown in :numref:`writing-tests-for-phpunit.exceptions.examples.ErrorTest.php`.
``PHPUnit\Framework\Error\Warning`` represent PHP notices
and warnings, respectively.

.. admonition:: Note

You should be as specific as possible when testing exceptions. Testing
for classes that are too generic might lead to undesirable
side-effects. Accordingly, testing for the ``Exception``
class with ``expectException()`` is no longer permitted.

When testing that relies on php functions that trigger errors like
``fopen`` it can sometimes be useful to use error
suppression while testing. This allows you to check the return values by
Expand Down

0 comments on commit afb3088

Please sign in to comment.