使用 PHPUnit 组
如何在 PHPUnit 中配置测试组?我发现文档有点缺乏......它只是说
<前><代码><组>; <包括> <组>名称 <排除> <组>名称
元素及其
<包含>
、<排除>
和孩子们可以用来选择组 一组测试中的测试 应该(不)运行。
但是如何将目录/文件添加到这些组中?
How can I configure groups of tests in PHPUnit? I find the docs a little lacking ... it just says
The
<groups>
element and its<include>
,<exclude>
, and<group>
children can be used to select groups
of tests from a suite of tests that
should (not) be run.<groups> <include> <group>name</group> </include> <exclude> <group>name</group> </exclude> </groups>
But how can I add directories/files into these groups?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加
@group
属性< /a> 您的测试方法。链接文档中的一个简单示例:然后您可以运行上面文档中提到的 PHPUnit:
Add the
@group
attribute to your test methods. A simple example from the linked docs:Then you can run PHPUnit mentioned in the documentation above: