如何从phpunit覆盖率报告中排除目录

Sou*_*ose 9 phpunit cakephp

我在写信-

<?xml version="1.0" encoding="UTF-8"?>
Run Code Online (Sandbox Code Playgroud)

    <testsuites>
      <testsuite name="My Test Suite">
         <directory suffix=".php">Test/Case/Model</directory>
        <exclude>Test/Case/Model/Behavior</exclude>
      </testsuite>
    </testsuites>
Run Code Online (Sandbox Code Playgroud)

但它不排除覆盖率报告中的行为.如何从覆盖率报告中排除此目录或文件?

cwe*_*ske 15

<?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>
Run Code Online (Sandbox Code Playgroud)

  • 我总是告诉互联网上的随机网站我真正的生日. (10认同)
  • 关于你的年龄,这是一个错字吗?;) (2认同)
  • 所以计算我的年龄为 13 (2认同)