为什么作曲家不创建 behat.yml 文件?

Why does not composer create behat.yml file?

我想为我的 Magento 商店使用 behat。

我用这个 documentation 安装了 BehatMage。

但是当我进入 "Basic Usage" 并想要执行以下命令时,它不会在项目文件夹中创建 behat.yml

$ cd project
$ bin/behat --init

我想运行:

composer install --dev --prefer-dist

使用此配置:

{
    "config": {
        "bin-dir": "bin"
    },
    "require": {
        "php": ">=5.3.0"
    },
    "require-dev": {
        "magetest/magento-behat-extension": "dev-develop"
    },
    "autoload": {
        "psr-0": {
            "": [
                "html/app",
                "html/app/code/local",
                "html/app/code/community",
                "html/app/code/core",
                "html/lib"
            ]
        }
    },
    "minimum-stability": "dev"
}

...应该创建此文件或至少填充信息? composer install 命令运行良好,没有任何错误。

关于如何创建配置文件的任何想法 behat.yml?

你需要在 require-dev 中添加 behat(不确定版本,2.5 只是一个猜测):

"require-dev": {
    "behat/behat": "~2.5",
    "magetest/magento-behat-extension": "dev-develop"
},

您所指的文档明确指出:

For this document we assume the directory layout is as follows.

已经安装 behat,然后

First, add BehatMage to the list of dependencies

添加作曲家的片段到您的composer.json。

它将安装可执行文件 bin/behat

您需要创建自己的 behat.yml,这与您的申请相关。
启用 BehatMage 的文件示例提供为 behat.yml.dist