如何在 testdox 名称中使用大写首字母?
How to use capitalized initials in testdox names?
我喜欢 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 输出时)得到 valid url input
或者你可以用 [=12= 注释你的测试方法] 得到 Valid URL input
.
我喜欢 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 输出时)得到 valid url input
或者你可以用 [=12= 注释你的测试方法] 得到 Valid URL input
.