私のプロジェクトでは、PHPUnit 3.5.12、netbean 6.9、および git サブモジュールを使用しています。
したがって、私のフォルダーアーキテクチャは次のようになります。
lib/
lib/submodule1
lib/submodule1/src
lib/submodule1/tests
lib/submodule2
lib/submodule2/src
lib/submodule2/tests
src/
tests/
メインのテスト フォルダー (phpunit_netbean.xml と bootstrap.php を含む) が /tests/ フォルダーにあることを考慮してください。/lib/*/tests/ でもテストを実行するにはどうすればよいですか?
テストスイートを見てきましたが、動作させることができません。これまでのところ、tests/phpunit_netbean.xml ファイルで次の構成を試しました。
<?xml version="1.0"?>
<phpunit
bootstrap="./bootstrap.php"
strict="true"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
colors="false"
verbose="true"
>
<testsuites>
<testsuite name="modules">
<directory>../lib/*</directory>
</testsuite>
</testsuites>
</phpunit>
そして、Netbean で ALT+F6 を押すと、実行された /tests からのテストしかありません。同じこと:
/tests$ phpunit -c phpunit_netbean.xml --testdox ./
enter code here
また、私はこれを試しました:
/tests$ phpunit -c phpunit_netbean.xml --testdox --loader modules ./
PHPUnit 3.5.12 by Sebastian Bergmann.
Could not use "modules" as loader.