From b06a7e6cad0bc103b835381e4d8dafbe013df9b6 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Fri, 1 Jun 2018 09:22:52 +0200 Subject: [PATCH 1/2] Closes #3155 --- ChangeLog-7.2.md | 5 +++++ src/Framework/TestCase.php | 2 +- src/Runner/BaseTestRunner.php | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog-7.2.md b/ChangeLog-7.2.md index 323049a5760..08310d6ec61 100644 --- a/ChangeLog-7.2.md +++ b/ChangeLog-7.2.md @@ -2,6 +2,10 @@ All notable changes of the PHPUnit 7.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [7.2.1] - 2018-MM-DD + +* Fixed [#3155](https://github.com/sebastianbergmann/phpunit/issues/3155): Calling `getStatus()` on a `TestCase` object before the respective test has been executed results in type error + ## [7.2.0] - 2018-06-01 ### Added @@ -22,5 +26,6 @@ All notable changes of the PHPUnit 7.2 release series are documented in this fil * Fixed [#3069](https://github.com/sebastianbergmann/phpunit/issues/3069): Method `ResultPrinter::printWaitPrompt()` seems to be unused +[7.2.1]: https://github.com/sebastianbergmann/phpunit/compare/7.2.0...7.2.1 [7.2.0]: https://github.com/sebastianbergmann/phpunit/compare/7.1...7.2.0 diff --git a/src/Framework/TestCase.php b/src/Framework/TestCase.php index c7c349a1a94..54fcfc43a25 100644 --- a/src/Framework/TestCase.php +++ b/src/Framework/TestCase.php @@ -171,7 +171,7 @@ abstract class TestCase extends Assert implements Test, SelfDescribing /** * @var int */ - private $status; + private $status = BaseTestRunner::STATUS_UNKNOWN; /** * @var string diff --git a/src/Runner/BaseTestRunner.php b/src/Runner/BaseTestRunner.php index 46525707b67..9c7fbbcf8d4 100644 --- a/src/Runner/BaseTestRunner.php +++ b/src/Runner/BaseTestRunner.php @@ -21,6 +21,7 @@ */ abstract class BaseTestRunner { + public const STATUS_UNKNOWN = -1; public const STATUS_PASSED = 0; public const STATUS_SKIPPED = 1; public const STATUS_INCOMPLETE = 2; From 9bcf6cbfe3b3a1e45898f8448611f600d4f48c2d Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Fri, 1 Jun 2018 09:23:15 +0200 Subject: [PATCH 2/2] Prepare release --- ChangeLog-7.2.md | 2 +- src/Runner/Version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog-7.2.md b/ChangeLog-7.2.md index 08310d6ec61..4fe1a034101 100644 --- a/ChangeLog-7.2.md +++ b/ChangeLog-7.2.md @@ -2,7 +2,7 @@ All notable changes of the PHPUnit 7.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## [7.2.1] - 2018-MM-DD +## [7.2.1] - 2018-06-01 * Fixed [#3155](https://github.com/sebastianbergmann/phpunit/issues/3155): Calling `getStatus()` on a `TestCase` object before the respective test has been executed results in type error diff --git a/src/Runner/Version.php b/src/Runner/Version.php index 2bcebd4ff3f..4bd48081c0f 100644 --- a/src/Runner/Version.php +++ b/src/Runner/Version.php @@ -30,7 +30,7 @@ public static function id(): string } if (self::$version === null) { - $version = new VersionId('7.2.0', \dirname(__DIR__, 2)); + $version = new VersionId('7.2.1', \dirname(__DIR__, 2)); self::$version = $version->getVersion(); }