From 3c74d9ce0fb2db524787c05cabbb676ccfc6b6c5 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Oct 2019 08:59:28 +0100 Subject: [PATCH] [PHPUnit Bridge] Minor tweaks related to polyfills --- components/phpunit_bridge.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index 31af4e3bd36..e43bbf4d320 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -397,7 +397,7 @@ Polyfills for the Unavailable Methods When using the ``simple-phpunit`` script, PHPUnit Bridge injects polyfills for most methods of the ``TestCase`` and ``Assert`` classes (e.g. ``expectException()``, -``expectExcpetionMessage()``, ``assertContainsEquals``, etc.). This allows writing +``expectExceptionMessage()``, ``assertContainsEquals()``, etc.). This allows writing test cases using the latest best practices while still remaining compatible with older PHPUnit versions. @@ -425,18 +425,18 @@ call to the ``doSetUp()``, ``doTearDown()``, ``doSetUpBeforeClass()`` and class MyTest extends TestCase { + // when using the SetUpTearDownTrait, methods like doSetup() can + // be defined with and without the 'void' return type, as you wish use SetUpTearDownTrait; - private $state; - private function doSetup() { - $this->state = 'demo'; + // ... } protected function doSetup(): void { - // visibility and return type-hint of method is free + // ... } }