我喜欢 PHPUnit 按照约定自动分解我的测试名称的方式。
public function testValidDataInput()
当我使用 testdox 标志运行时:
phpunit --testdox tests
变成:
PHPUnit 4.8.26 by Sebastian Bergmann and contributors. MyClass [x] Valid data input
但是我在 the documentation 中找不到如何解决首字母大写问题。
public function testValidURLInput()
变成:
MyClass [x] Valid u r l input
是否可以让它显示如下:
MyClass [x] Valid URL input
最佳答案
您可以使用testValidUrlInput()
(这并不是一个好名字,特别是当您想使用TestDox输出时)来获取有效的url输入
或者您可以注释您的测试方法使用 @testdox Valid URL input
来获取Valid URL input
。
关于php - 如何在 testdox 名称中使用大写首字母?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38134504/