Skip to content

Commit

Permalink
Merge branch '8.5' into 9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Aug 27, 2022
2 parents 20019ee + 0ccac7f commit 0eeadc8
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ChangeLog-8.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes of the PHPUnit 8.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.

## [8.5.30] - 2022-MM-DD

### Fixed

* [#4913](https://github.com/sebastianbergmann/phpunit/issues/4913): Failed `assert()` should show a backtrace

## [8.5.29] - 2022-08-22

### Changed
Expand Down Expand Up @@ -239,6 +245,7 @@ All notable changes of the PHPUnit 8.5 release series are documented in this fil
* [#3967](https://github.com/sebastianbergmann/phpunit/issues/3967): Cannot double interface that extends interface that extends `\Throwable`
* [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside

[8.5.30]: https://github.com/sebastianbergmann/phpunit/compare/8.5.29...8.5
[8.5.29]: https://github.com/sebastianbergmann/phpunit/compare/8.5.28...8.5.29
[8.5.28]: https://github.com/sebastianbergmann/phpunit/compare/8.5.27...8.5.28
[8.5.27]: https://github.com/sebastianbergmann/phpunit/compare/8.5.26...8.5.27
Expand Down
1 change: 1 addition & 0 deletions ChangeLog-9.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes of the PHPUnit 9.5 release series are documented in this fil

### Fixed

* [#4913](https://github.com/sebastianbergmann/phpunit/issues/4913): Failed `assert()` should show a backtrace
* [#5012](https://github.com/sebastianbergmann/phpunit/pull/5012): Memory leak in `ExceptionWrapper`

## [9.5.23] - 2022-08-22
Expand Down
4 changes: 3 additions & 1 deletion src/Framework/TestResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,9 @@ function_exists('xdebug_start_function_monitor');
$e->getMessage(),
$frame['file'] ?? $e->getFile(),
$frame['line'] ?? $e->getLine()
)
),
0,
$e
);
} catch (Warning $e) {
$warning = true;
Expand Down
3 changes: 2 additions & 1 deletion src/TextUI/DefaultResultPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use function str_pad;
use function str_repeat;
use function strlen;
use function trim;
use function vsprintf;
use PHPUnit\Framework\AssertionFailedError;
use PHPUnit\Framework\Exception;
Expand Down Expand Up @@ -374,7 +375,7 @@ protected function printDefectTrace(TestFailure $defect): void
$this->write((string) $e);

while ($e = $e->getPrevious()) {
$this->write("\nCaused by\n" . $e);
$this->write("\nCaused by\n" . trim((string) $e) . "\n");
}
}

Expand Down
5 changes: 5 additions & 0 deletions tests/end-to-end/generic/assertion.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@ There was 1 failure:
1) AssertionExampleTest::testOne
assert(false) in %sAssertionExample.php:%d

Caused by
AssertionError: assert(false) in %sAssertionExample.php:%d
Stack trace:
%A

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

0 comments on commit 0eeadc8

Please sign in to comment.