diff --git a/CHANGELOG.md b/CHANGELOG.md index d6321134..d21e81c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,13 +42,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [0.4.1](https://github.com/10up/wp_mock/compare/0.4.1...0.4.0) - 2019-02-26 ### Added -- **PHPUnit 8 Compatiblity** +- **PHPUnit 8 Compatibility** - This release brings us up to date with the latest release of PHPUnit. - Please note: As with the previously-tagged release, this is not necessarily a stable release! ## [0.4.0](https://github.com/10up/wp_mock/compare/0.4.0...0.3.0) - 2019-01-16 ### Added -- **PHPUnit 7 Compatiblity** +- **PHPUnit 7 Compatibility** - This release brings us up to date both with PHPUnit and with PHP itself. The minimum version of PHP now supported by the project is *7.1*. - *Please note:* As with the previously-tagged release, this is not necessarily a stable release! diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e3705227..2d311ee2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ Contributions are **welcome** and will be fully **credited**. -We accept contributions via Pull Requests on [Github](https://github.com/10up/wp_mock) +We accept contributions via Pull Requests on [GitHub](https://github.com/10up/wp_mock) ## Branches diff --git a/docs/general/configuration.md b/docs/general/configuration.md index 61e6b327..f76a90fa 100644 --- a/docs/general/configuration.md +++ b/docs/general/configuration.md @@ -30,7 +30,7 @@ The bootstrap file can do a few things: ## Configure PHPUnit with WP_Mock -You can run PHPUnit using a `--bootstrap` flag to include your boostrap configuration while executing your tests (see [PHPUnit documentation](https://docs.phpunit.de/en/9.5/textui.html?highlight=--bootstrap#command-line-options)): +You can run PHPUnit using a `--bootstrap` flag to include your bootstrap configuration while executing your tests (see [PHPUnit documentation](https://docs.phpunit.de/en/9.5/textui.html?highlight=--bootstrap#command-line-options)): ```shell ./vendor/bin/phpunit --bootstrap /path/to/bootstrap.php diff --git a/features/bootstrap/FunctionsContext.php b/features/bootstrap/FunctionsContext.php index 8dd3bc8d..e4325afd 100644 --- a/features/bootstrap/FunctionsContext.php +++ b/features/bootstrap/FunctionsContext.php @@ -87,13 +87,22 @@ public function iExpectWhenIRunWithArgs( $return, $function, TableNode $args ) { \PHPUnit\Framework\Assert::assertEquals( $return, call_user_func_array( $function, $args->getRow( 0 ) ) ); } - /** - * @Then I expect :return when I run :function - */ - public function iExcpectWhenIRun( $return, $function ) { - $this->iExpectWhenIRunWithArgs( $return, $function, new TableNode( array( array() ) ) ); - } - + /** + * @Then I expect :return when I run :function + * + * @deprected use static::iExpectWhenIRun instead + */ + public function iExcpectWhenIRun( $return, $function ) { + static::iExpectWhenIRun( $return, $function ) + } + + /** + * @Then I expect :return when I run :function + */ + public function iExpectWhenIRun( $return, $function ) { + $this->iExpectWhenIRunWithArgs( $return, $function, new TableNode( array( array() ) ) ); + } + /** * @Then I expect an error when I run :function with args: */