首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Phing运行phpunit测试错误

使用Phing运行phpunit测试错误
EN

Stack Overflow用户
提问于 2017-03-15 04:34:39
回答 1查看 594关注 0票数 5

Jenkins版本- 2.22

Phing版本- 0.13.3

PHPUnit版本- 5.7.19

phpunit.xml

代码语言:javascript
复制
<?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>

build.xml

代码语言:javascript
复制
...
<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>
...

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

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

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

EN

回答 1

Stack Overflow用户

发布于 2019-12-18 09:01:49

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

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42801164

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档