16

次の構成を試しました。

<?xml version="1.0" encoding="UTF-8"?>
<phpunit>
    <testsuites>
      <testsuite name="My Test Suite">
         <directory suffix=".php">Test/Case/Model</directory>
        <exclude>Test/Case/Model/Behavior</exclude>
      </testsuite>
    </testsuites>
</phpunit>

ただし、カバレッジ レポートからその動作を除外するわけではありません。これらのディレクトリまたはファイルをカバレッジ レポートから除外するにはどうすればよいですか?

4

1 に答える 1

32

エレメント phpunit のドキュメントを参照しexcludeください。

例を次に示しphpunit.xmlます。

<?xml version="1.0" encoding="utf-8"?>
<phpunit>
  <filter>
    <whitelist>
      <directory suffix=".php">../</directory>
      <exclude>
        <file>../ext_emconf.php</file>
        <directory suffix=".php">../tests</directory>
      </exclude>
    </whitelist>
  </filter>
</phpunit>
于 2013-08-19T10:59:57.287 に答える