【问题标题】:phpunit 9 does not print error stack tracephpunit 9 不打印错误堆栈跟踪
【发布时间】:2021-02-02 06:40:58
【问题描述】:

我最近将我的单元测试环境从 phpunit v8.5.13 更新到了 v9.5.1。相同的配置文件,相同的php版本,除了命令行中的php单元phar文件外,其他都相同。

一切正常,但是当出现意外异常时,将不再打印堆栈跟踪(直到 v8):

PHPUnit 9.5.1 by Sebastian Bergmann and contributors.

E

Time: 00:00.973, Memory: 42.00 MB

There was 1 error:

1) moduleTmEmployeeTest::testAdd with data set "default" (array(), array())
mobEx: this is my exception

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.

phpunit 8

PHPUnit 8.5.13 by Sebastian Bergmann and contributors.

E

Time: 1.36 seconds, Memory: 36.00 MB

There was 1 error:

1) moduleTmEmployeeTest::testAdd with data set "default" (array(), array())
mobEx: this is my exception

[path]\unittests\phpunit\tm\moduleTmEmployeeTest.php:54

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.

我查看了文档和迁移指南,但不知道要设置哪个新标志或我还能做什么。有人知道吗?

【问题讨论】:

标签: phpunit


【解决方案1】:

@sebastian 在他的评论中提到,这是当前版本 v9.5.2 中修复的错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-09-03
    • 1970-01-01
    • 2015-07-27
    • 2018-09-19
    • 1970-01-01
    • 2020-07-25
    • 2018-07-06
    相关资源
    最近更新 更多