dqdl6469 2015-09-16 16:28
浏览 74

phpunit看错文件夹或失败,说没有安装composer

I am trying to run phpunit through a symlink on Mac (10.10.5).

Composer is self-updated (c85894e7920c5e83d93d88b541bc4ebf) and phpunit is version "4.4.5".

I have the following file structure (simplified):

\library
  \composer
    \vendor
      \bin
        \phpunit (symlink to '../phpunit/phpunit/phpunit')
      \phpunit
        \phpunit
          \phpunit (executable)
    \composer.json
    \composer.lock
    \composer.phar
\tests
  \phpunit (symlink to '../library/composer/vendor/bin/phpunit')
  \phpunit.bootstrap.php (contains bootstrap logic)
  \phpunit.xml (see below)

The phpunit.xml file has the following contents:

<phpunit backupGlobals="true"
    backupStaticAttributes="false"
    bootstrap="phpunit.bootstrap.php"
    cacheTokens="false"
    colors="true"
    convertErrorsToExceptions="true"
    convertNoticesToExceptions="true"
    convertWarningsToExceptions="true"
    forceCoversAnnotation="false"
    mapTestClassNameToCoveredClassName="false"
    processIsolation="false"
    stopOnError="false"
    stopOnFailure="false"
    stopOnIncomplete="false"
    stopOnSkipped="false"
    strict="true"
    verbose="true">
</phpunit>
  1. When I run php tests/phpunit, it presents me with the manual.
  2. When I run php tests/phpunit ., it targets and runs tests in the composer/vendor folders.
  3. When I run php tests/phpunit unit/* it works, but only for the contents below the unit folder, of course. How can I make tests\phpunit run all tests directly at and below the symlink files directory?
  • 写回答

1条回答 默认 最新

  • doudi4014 2017-01-05 12:37
    关注

    Try ro remove phpunit from your composer.json file and make composer update and than add it to your composer.json file again and make composer update

    I had faced with same problem using PHPUnit with Lumen and this solution fixed it.

    phpunit command works on root folder now.

    评论

报告相同问题?

悬赏问题

  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端