使用Phing运行phpunit测试时出错

Sau*_*nam 5 phing phpunit jenkins

詹金斯版 - 2.22

Phing版 - 0.13.3

PHPUnit版本 - 5.7.19

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">
    <testsuites>
        <testsuite name="Application Test Suite">
            <directory suffix="Test.php">./tests</directory>
        </testsuite>
    </testsuites>
    <filter>
        <whitelist processUncoveredFilesFromWhitelist="true">
            <directory suffix=".php">./app/Managers</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>
Run Code Online (Sandbox Code Playgroud)

build.xml文件

...
<coverage-setup database="./report/coverage/database">
    <fileset id="coverageFileSet" dir="./app/Managers">
        <include name="**/*Manager*.php" />
    </fileset>
</coverage-setup>
<phpunit pharlocation="./vendor/phpunit/phpunit/phpunit" configuration="./phpunit.xml" printsummary="true" haltonerror="true" haltonfailure="true" codecoverage="true">
    <formatter type="clover" outfile="report/coverage/clover.xml"/>
</phpunit>
<coverage-report outfile="report/coverage/coverage.xml">
    <report todir="report/coverage"/>
</coverage-report>
...
Run Code Online (Sandbox Code Playgroud)

当我运行phing目标时Jenkins,我得到以下错误. unrecognized option -- b

我究竟做错了什么?或任何帮助如何调试此问题?

注意 - 这是laravel-5.4应用程序,当我phpunit从应用程序的根文件夹运行它的工作.

jaw*_*ira 0

你说你正在使用 Phing 版本 - 0.13.3,这不太合理。您应该尝试使用Phing 3.0.0-alpha3,它有很多改进。

另外,我认为以下答案可以帮助您:Phing and PHPUnit, just cant get even the most basic thing running