2014-04-03 36 views
0

我得到没有测试执行当我尝试,另一方面做的PHPUnit:没有测试用看似不错的配置文件执行

phpunit 

phpunit -c phpunit.xml 

,如果消息我做

phpunit -c phpunit.xml ./tests 

它的工作。但考虑到我正在使用的一些工具无法很好地处理这个问题,这是一个问题。

目录structur
    代码
   测试/
    phpunit.xml
    autoloader.php

这里是配置文件

<phpunit backupGlobals="false" 
     backupStaticAttributes="false" 
     colors="true" 
     convertErrorsToExceptions="true" 
     convertNoticesToExceptions="true" 
     convertWarningsToExceptions="true" 
     processIsolation="false" 
     stopOnFailure="false" 
     syntaxCheck="true" 
     bootstrap="./tests/bootstrap.php" 
     > 
    <testsuites> 
     <testsuite name="StdTestSuite"> 
      <directory> 
       tests/ 
      </directory> 
     </testsuite> 
    </testsuites> 
</phpunit> 

回答

0

问题是有史以来最愚蠢的事情。 标签内不能有空格。 所以,你需要对你phpunit.xml文件,这是什么

... 
    <testsuite name="StdTestSuite"> 
     <directory>tests/</directory> 
    </testsuite> 
    ... 

然后运行

phpunit 

应工作

相关问题