本文共 1425 字,大约阅读时间需要 4 分钟。
FOSCommentBundle comes with both unit and functional tests written using PHPUnit.
FOSCommentBundle功能包使用PHPUnit来进行单元测试和功能测试。
When contributing to FOSCommentBundle, please provide test coverage for your change and make sure the existing test suite passes before submitting a pull request.
当为FOSCommentBundle功能包贡献时,请为您的改变提供测试覆盖,并确保在提交pull请求之前现有测试套件通过。
Unit and functional tests both use PHPUnit which has a few requirements to run:
单元测试和功能测试都使用PHPUnit,在运行之前需要:
vendors set up by
通过安装Vendors
php composer.phar install --dev
A installation
安装
Once these dependencies are installed, run the unit test suite by running phpunit
in the root bundle directory.
一旦这些依赖被安装,就可以在功能包的根目录中运行phpunit来运行单元测试套件。
PHPUnit will use phpunit.xml.dist provided by FOSCommentBundle
. You can customise the test run by copying phpunit.xml.dist
to phpunit.xml
and making your modifications.
PHPUnit将使用FOSCommentBundle功能包提供的phpunit.xml.dist。您可以将 phpunit.xml.dist 拷贝到 phpunit.xml 中进行修改以实现自定义测试运行。
FOSCommentBundle uses Travis-CI and provides set up in the .travis.yml
file. You can enable Travis CI on your fork to get build notifications on any branch you create for a pull request.
FOSCommentBundle功能包使用 Travis-CI 并提供.travis.yml文件进行设置。您可以在您Fork上启用Travis CI,以便在您创建的任何分支中为pull请求得到构建通知。
。