PHPUnit使用XML中的重复TestSuite层次结构创建奇怪的日志输出

时间:2015-06-24 22:18:52

标签: laravel phpunit

旁注:

我的PHPUnit版本是:“Sebastian Bergmann和贡献者的PHPUnit 4.7.4。”

它来自作曲家的Laravel包

上下文

当我调用以下命令行时:

phpunit --log-junit "C:\Users\James\Documents\Test Logs\log.xml" --configuration "C:\xampp\htdocs\Test\phpunit.xml"

定义了以下phpunit.xml:

<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
         backupStaticAttributes="false"
         bootstrap="bootstrap/autoload.php"
         colors="true"
         convertErrorsToExceptions="true"
         convertNoticesToExceptions="true"
         convertWarningsToExceptions="true"
         processIsolation="false"
         stopOnFailure="false"
         syntaxCheck="false">
    <testsuites>
        <testsuite name="Application Test Suite">
            <directory>./tests/</directory>
            <exclude>./tests/vomit/</exclude>
        </testsuite>
        <testsuite name="Shooblie ma hooblie">
            <directory>./tests/vomit/</directory>
        </testsuite>
    </testsuites>
    <filter>
        <whitelist>
            <directory suffix=".php">app/</directory>
        </whitelist>
    </filter>
    <php>
        <env name="APP_ENV" value="testing"/>
        <env name="CACHE_DRIVER" value="array"/>
        <env name="SESSION_DRIVER" value="array"/>
        <env name="QUEUE_DRIVER" value="sync"/>
    </php>
</phpunit>

我得到以下输出:http://pastebin.com/aD4tq7tC

问题:

为了节省你不得不看,我得到了多个级别的“testsuite”,它们没有遵循文档输出。可能出现什么问题......或者这是正常行为吗?< / p>

例如(为简洁起见缩短):

<testsuites>
    <testsuite>        
        <testsuite>                 
            <testsuite>   
                <testcase></testcase>     
            </testsuite>    
        </testsuite>
    </testsuite>
</testsuites>

来源: https://phpunit.de/manual/current/en/logging.html#logging.xml

0 个答案:

没有答案
相关问题