首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >'-bash: behat:未找到命令‘

'-bash: behat:未找到命令‘
EN

Stack Overflow用户
提问于 2018-07-24 11:06:40
回答 1查看 584关注 0票数 1

我已经安装了Laravel 5.6的干净版本。然后,我已经成功地安装了Behat,输出如下。

代码语言:javascript
复制
composer require behat/behat behat/mink behat/mink-extension laracasts/behat-laravel-extension --dev
Using version ^3.4 for behat/behat
Using version ^1.7 for behat/mink
Using version ^2.3 for behat/mink-extension
Using version ^1.1 for laracasts/behat-laravel-extension
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 15 installs, 0 updates, 0 removals
  - Installing symfony/dom-crawler (v4.1.2): Downloading (100%)         
  - Installing behat/mink (dev-master d5ee350): Cloning d5ee350c40
  - Installing symfony/browser-kit (v4.1.2): Downloading (100%)         
  - Installing behat/mink-browserkit-driver (1.3.3): Downloading (100%)         
  - Installing symfony/yaml (v4.1.2): Downloading (100%)         
  - Installing symfony/dependency-injection (v4.1.2): Downloading (100%)         
  - Installing symfony/filesystem (v4.1.2): Downloading (100%)         
  - Installing symfony/config (v4.1.2): Downloading (100%)         
  - Installing symfony/class-loader (v3.4.13): Downloading (100%)         
  - Installing container-interop/container-interop (1.2.0): Downloading (100%)         
  - Installing behat/transliterator (v1.2.0): Downloading (100%)         
  - Installing behat/gherkin (v4.5.1): Downloading (100%)         
  - Installing behat/behat (v3.4.3): Downloading (100%)         
  - Installing laracasts/behat-laravel-extension (1.1.1): Downloading (100%)         
  - Installing behat/mink-extension (2.3.1): Downloading (100%)         
behat/mink suggests installing behat/mink-goutte-driver (fast headless driver for any app without JS emulation)
behat/mink suggests installing behat/mink-selenium2-driver (slow, but JS-enabled driver for any app (requires Selenium2))
behat/mink suggests installing behat/mink-zombie-driver (fast and JS-enabled headless driver for any app (requires node.js))
behat/mink suggests installing dmore/chrome-mink-driver (fast and JS-enabled driver for any app (requires chromium or google chrome))
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
symfony/class-loader suggests installing symfony/polyfill-apcu (For using ApcClassLoader on HHVM)
behat/behat suggests installing behat/symfony2-extension (for integration with Symfony2 web framework)
behat/behat suggests installing behat/yii-extension (for integration with Yii web framework)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nunomaduro/collision
Package manifest generated successfully

但是当我尝试用Behat初始化

代码语言:javascript
复制
behat --init

我得到以下错误:

代码语言:javascript
复制
-bash: behat: command not found

我做错了什么?在此之前,我已经运行了composer self-update。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-07-24 11:36:07

您没有全局安装behat,可以全局安装它,也可以使用

代码语言:javascript
复制
vendor/bin/behat --init

如果您想要全局安装它,请运行

代码语言:javascript
复制
composer global require behat/behat

希望这能有所帮助。

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

https://stackoverflow.com/questions/51489896

复制
相关文章

相似问题

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