Skip to content

Commit e43d2f0

Browse files
mhujersebastianbergmann
authored andcommitted
fix minor issues in Writing Tests for PHPUnit
1 parent 4255e94 commit e43d2f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/writing-tests-for-phpunit.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ whether an exception is thrown by the code under test.
589589
There was 1 failure:
590590
591591
1) ExceptionTest::testException
592-
Expected exception InvalidArgumentException
592+
Failed asserting that exception of type "InvalidArgumentException" is thrown.
593593
594594
FAILURES!
595595
Tests: 1, Assertions: 1, Failures: 1.
@@ -644,7 +644,7 @@ shows an example.
644644
There was 1 failure:
645645
646646
1) ExceptionTest::testException
647-
Expected exception InvalidArgumentException
647+
Failed asserting that exception of type "InvalidArgumentException" is thrown.
648648
649649
FAILURES!
650650
Tests: 1, Assertions: 1, Failures: 1.
@@ -676,7 +676,7 @@ shown in :numref:`writing-tests-for-phpunit.exceptions.examples.ErrorTest.php`.
676676
class ExpectedErrorTest extends TestCase
677677
{
678678
/**
679-
* @expectedException PHPUnit\Framework\Error
679+
* @expectedException PHPUnit\Framework\Error\Error
680680
*/
681681
public function testFailingInclude()
682682
{
@@ -706,7 +706,7 @@ and warnings, respectively.
706706
for classes that are too generic might lead to undesirable
707707
side-effects. Accordingly, testing for the ``Exception``
708708
class with ``@expectedException`` or
709-
``setExpectedException()`` is no longer permitted.
709+
``expectException()`` is no longer permitted.
710710

711711
When testing that relies on php functions that trigger errors like
712712
``fopen`` it can sometimes be useful to use error

0 commit comments

Comments
 (0)