1

我正在尝试在 Eclipse 中配置 phpunit 和 makegood。我可以通过命令行使用 phpunit,但我无法在 eclipse 中运行我的测试。我对php世界很陌生。我已经使用brew安装了php。在 Eclipse 首选项中,我应该在“PHP 库”中设置哪个目录,这个库在大多数博客中被命名为 PEAR。

当我在 Eclipse 中打开“MakeGood”视图时,它显示“等待测试运行”,当我执行“运行所有测试”时,控制台上会打印以下内容

Warning: Module 'xdebug' already loaded in Unknown on line 0
PHP Warning:  Module 'xdebug' already loaded in Unknown on line 0
Stagehand_TestRunner version 3.6.1

Copyright (c) 2005-2013 KUBO Atsuhiro and contributors,
All rights reserved.

Usage:
  [options] command [arguments]

Options:
  --help           -h Prints help and exit.
  --version        -V Prints version information and exit.
  --ansi              Enables ANSI output.
  --no-ansi           Disables ANSI output.

Testing Framework Commands:
 cakephp               Runs tests with CakePHP.
 ciunit                Runs tests with CIUnit.
 phpspec               Runs tests with PHPSpec.
 phpunit               Runs tests with PHPUnit.
 simpletest            Runs tests with SimpleTest.

Other Commands:
  compile               Compiles the DIC for the production environment.
  help                  Prints the help for a command.
  list                  Lists commands.
  phpunit:passthrough   Runs the phpunit command via the testrunner command.

以下是我的 phpunit xml

<?xml version="1.0" encoding="UTF-8"?>
<phpunit
    backupGlobals               = "false"
    backupStaticAttributes      = "false"
    colors                      = "true"
    convertErrorsToExceptions   = "true"
    convertNoticesToExceptions  = "true"
    convertWarningsToExceptions = "true"
    processIsolation            = "false"
    stopOnFailure               = "false"
    syntaxCheck                 = "false"
    bootstrap                   = "bootstrap.php" >
  <testsuites>
    <testsuite name="Lamed Test Suite">
        <directory>test</directory>
    </testsuite>
  </testsuites>
</phpunit>

请指导 谢谢

4

0 回答 0