天天看點

FOSCommentBundle功能包:運作測試Step 11: Running the test suite

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,在運作之前需要:

<code>php composer.phar install --dev</code>

Once these dependencies are installed, run the unit test suite by running <code>phpunit </code>in the root bundle directory.

一旦這些依賴被安裝,就可以在功能包的根目錄中運作phpunit來運作單元測試套件。

PHPUnit will use phpunit.xml.dist provided by <code>FOSCommentBundle</code>. You can customise the test run by copying <code>phpunit.xml.dist</code> to <code>phpunit.xml</code> and making your modifications.

PHPUnit将使用FOSCommentBundle功能包提供的phpunit.xml.dist。您可以将 phpunit.xml.dist 拷貝到  phpunit.xml 中進行修改以實作自定義測試運作。

FOSCommentBundle uses Travis-CI and provides set up in the <code>.travis.yml</code> 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請求得到建構通知。

<a href="https://github.com/FriendsOfSymfony/FOSCommentBundle/blob/master/Resources/doc/index.md">Return to the index.</a>

本文轉自 firehare 51CTO部落格,原文連結:http://blog.51cto.com/firehare/1259404,如需轉載請自行聯系原作者