2017-08-01 14 views
0

このような問題があります。私はSomeBundle \ Entityのすべてのファイルを除外したいが、SomeBundle \ Entity \ RepositoryとSomeBundle \ Entity \ Factoryは除外したくない。PHPunitディレクトリ内のすべてのファイルを除外するサブディレクトリを除外する方法

SomeBundle\Entity 
SomeBundle\Entity\Repository 
SomeBundle\Entity\Factory 

SomeBundle\Entity\File1.php 
SomeBundle\Entity\File2.php 
SomeBundle\Entity\File3.php 

私は

<filter> 
     <whitelist> 
      <directory>./../src/SomeBundle</directory> 
      <exclude> 
       <directory suffix=".php">./../src/SomeBundle/Entity</directory> 
      </exclude> 
     </whitelist> 
    </filter> 

でそれをやろうとしているが、結果として、私はSomeBundle \エンティティですべてを除外...

答えて

0
<?xml version="1.0" encoding="UTF-8"?> 
<phpunit colors="true"> 
    <testsuites> 
     <testsuite name="Test Suite"> 
      <directory>SomeBundle</directory> 
      <directory>SomeBundle/Entity/**</directory> 
      <exclude>SomeBundle/Entity</exclude> 
     </testsuite> 
    </testsuites> 
</phpunit>