php - phpUnit: Stop on Notice
问题描述
how can I make phpUnit to stop on any notices like this:
Notice: Undefined property: _global::$tra in
/Applications/MAMP/htdocs/sakkadentrainer/classes/_global.php on line 1684
✔ Check if trainer chooser popup works [569.58 ms]
This Test passed, even-though I got some errors.
In the phpUnit Doc I cant find something like
--stop-on-error
https://phpunit.de/manual/6.5/en/textui.html
Thanks!
解决方案
phpUnit 选项beStrictAboutOutputDuringTests="true" (--disallow-test-output
)有帮助。这样测试仍然通过,但我得到了一个“有风险的”测试输出。
推荐阅读
- .htaccess - 使用 .htaccess 删除地址栏中最后一个参数后的附加文本
- css - 报纸风格的 div 对齐,带有 flex-wrap,溢出,没有固定的容器大小
- python - 如何导入循环导入
- asp.net - Asp.Net 核心 MVC 区域路由未按预期工作
- html - 为什么我不能在第二种形式的文本框中输入
- javascript - 如果服务器上不存在文件扩展名,则为文件类型扩展名获取 null、空或未定义
- python - 如何将 python 脚本的结果传递给 adoc (asciidoc)
- javascript - 导入变量后的javascript在初始化之前无法访问
- mongodb - 从 mongo db 文档中的数据字段中获取月份
- kotlin - 如何限制 Kotlin 中枚举值的使用?