在Laracast教程之后,我运行了以下命令来设置我的项目behat:
require "spec_helper"
describe KafkaSender do
describe "send message" do
it "should send a message" do
poseidon_producer_class = class_double("Poseidon::Producer", new: nil)
expect(poseidon_producer_class).to receive(:new).with(["test-kafka.pro.hupi.loc:9092"], "catchbox_api")
KafkaSender.new("test")
end
end
end
这是我收到的输出:
composer require behat/behat behat/mink behat/mink-extension laracasts/behat-laravel-extension --dev
答案 0 :(得分:1)
没有Laravel
好的,我从你的Composer命令中删除了--dev
并且它正常工作
composer require behat/behat behat/mink behat/mink-extension laracasts/behat-laravel-extension --prefer-dist -vvv --profile
结果composer.json
:
{
"require": {
"behat/behat": "^3.0",
"behat/mink": "^1.7",
"behat/mink-extension": "^2.1",
"laracasts/behat-laravel-extension": "^1.0"
}
}
使用Laravel(项目安装)
如果您需要Laravel:只需将laravel/laravel
添加到命令
或添加"laravel/laravel" : "^5.2"
(或5.1)作为要求。
结果composer.json
:
{
"require": {
"behat/behat": "^3.0",
"behat/mink": "^1.7",
"behat/mink-extension": "^2.1",
"laracasts/behat-laravel-extension": "^1.0",
"laravel/laravel": "^5.2"
}
}