2013-09-09 14:36
浏览 66

使用PHPUnit对Laravel 4进行单元测试

I've added "phpunit/phpunit": "3.7.*" to the require-dev section of composer.json and ran composer install. Unfortunately, when I run vendor/bin/phpunit from the root of my Larvel 4 project, I get the following error:

$ vendor/bin/phpunit
vendor/bin/phpunit: line 1: ../phpunit/phpunit/composer/bin/phpunit: No such file or directory

Any thoughts?

图片转代码服务由CSDN问答提供 功能建议

我已将“phpunit / phpunit”:“3.7。*”添加到 composer.json require-dev 部分并运行 composer install 。 不幸的是,当我从Larvel 4项目的根目录运行 vendor / bin / phpunit 时,出现以下错误:

  $ vendor / bin  / phpunit 
vendor / bin / phpunit:第1行:.. / phpunit / phpunit / composer / bin / phpun:没有这样的文件或目录


  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • drh78568 2013-09-09 19:49

    You need to run the install command with the --dev flag

    $ composer install --dev

    Since you already run a composer install, just run a composer update now. The update command assumes you are in a dev environment and download your dev dependencies without any flags.

    To make sure your composer is up to date, run composer self-update before this commands.

    解决 无用
    打赏 举报

相关推荐 更多相似问题