Skip to content

Commit 7213ac3

Browse files
committed
minor #12564 [PHPUnit Bridge] Minor tweaks related to polyfills (javiereguiluz)
This PR was merged into the 4.4 branch. Discussion ---------- [PHPUnit Bridge] Minor tweaks related to polyfills Commits ------- 3c74d9c [PHPUnit Bridge] Minor tweaks related to polyfills
2 parents db060cd + 3c74d9c commit 7213ac3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

components/phpunit_bridge.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ Polyfills for the Unavailable Methods
397397

398398
When using the ``simple-phpunit`` script, PHPUnit Bridge injects polyfills for
399399
most methods of the ``TestCase`` and ``Assert`` classes (e.g. ``expectException()``,
400-
``expectExcpetionMessage()``, ``assertContainsEquals``, etc.). This allows writing
400+
``expectExceptionMessage()``, ``assertContainsEquals()``, etc.). This allows writing
401401
test cases using the latest best practices while still remaining compatible with
402402
older PHPUnit versions.
403403

@@ -425,18 +425,18 @@ call to the ``doSetUp()``, ``doTearDown()``, ``doSetUpBeforeClass()`` and
425425

426426
class MyTest extends TestCase
427427
{
428+
// when using the SetUpTearDownTrait, methods like doSetup() can
429+
// be defined with and without the 'void' return type, as you wish
428430
use SetUpTearDownTrait;
429431

430-
private $state;
431-
432432
private function doSetup()
433433
{
434-
$this->state = 'demo';
434+
// ...
435435
}
436436

437437
protected function doSetup(): void
438438
{
439-
// visibility and return type-hint of method is free
439+
// ...
440440
}
441441
}
442442

0 commit comments

Comments
 (0)