Skip to content

Commit 9752e50

Browse files
gbprodsebastianbergmann
authored andcommitted
Precision about mocking static methods
Will fix #17
1 parent ca9e5b9 commit 9752e50

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/test-doubles.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ return a value when called.
5151
Please note that ``final``, ``private``,
5252
``protected``, and ``static`` methods cannot
5353
be stubbed or mocked. They are ignored by PHPUnit's test double
54-
functionality and retain their original behavior.
54+
functionality and retain their original behavior except for ``static``
55+
methods that will be replaced by a method throwing a
56+
``\PHPUnit\Framework\MockObject\BadMethodCallException`` exception.
57+
5558

5659
.. _test-doubles.stubs:
5760

0 commit comments

Comments
 (0)