gpt4 book ai didi

ubuntu - phpunit 测试中没有颜色显示

转载 作者:行者123 更新时间:2023-12-04 19:19:54 24 4
gpt4 key购买 nike

我正在使用 Symfony2 并在 app/phpunit.xml.dist 下

我打开了颜色选项。

<phpunit
...
colors = "true"
...

我在 Ubuntu 14.04 下使用 ssh 并使用 PHPUnit 4.1.1。

我通过 Symfony2 中包含的 bin 执行我的测试。
bin/phpunit src/Acme/Bundle/Tests

我在网上发现的唯一一件事就是让颜色关闭,但没有排除故障才能打开它们。

我还需要做些什么来显示颜色吗?

最佳答案

看来phpunit它没有得到正确的配置。

来自 Symfony documentation:

The -c option tells PHPUnit to look in the app/ directory for a configuration file. If you're curious about the PHPUnit options, check out the app/phpunit.xml.dist file.

而且,正如您正确找到的那样,用法如下:
bin/phpunit -c app/ sometestdir
有了这个你告诉 phpunitapp/ 获取配置目录,然后测试 sometestdir文件夹。

:)

更多信息请访问 http://phpunit.de/manual/current/en/textui.html#textui.clioptions

关于ubuntu - phpunit 测试中没有颜色显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24039315/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com