Skip to content

[PHPUnit Bridge] Minor tweaks related to polyfills #12564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions components/phpunit_bridge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
// ...
}
}

Expand Down