dsbgltg159136540 2015-11-17 19:10
浏览 31
已采纳

Windows上的PHPUnit自动完成功能

NetBeans does not seem to locate the PHPUnit sources, therefore I can not use autocompletion on for instance PHPUnit_Framework_TestCase.

I run PHPUnit from within NetBeans using a cmd, on Windows using EasyPHP, generated with:

echo @php "%~dp0phpunit.phar" %* > phpunit.cmd

Note that this is the recommended way, older variants are not longer supported as I noticed.

Where are the PHPUnit sources located and how can I tell NetBeans to account for support?

  • 写回答

1条回答 默认 最新

  • dongsheng1238 2015-11-17 19:24
    关注

    I came up with a workaround:

    Install the sources of PHPUnit globally using Composer:

    composer global require "phpunit/phpunit=4.7.7"
    

    And finally add the following path to the include directory of the project:

    %APPDATA%\Composer\vendor\phpunit\phpunit\src
    

    This will do the trick. However make sure the installation of PHPUnit and the sources are of the same version to prevent complications.

    Note that the sources can be installed using a lot of different ways, but keep in mind to use the right include directory.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 有没有帮写代码做实验仿真的
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥30 vmware exsi重置后登不上
  • ¥15 易盾点选的cb参数怎么解啊
  • ¥15 MATLAB运行显示错误,如何解决?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题
  • ¥20 yolov5自定义Prune报错,如何解决?