Behat文档和实际直播之间的区别。怎么了

时间:2018-12-14 22:38:34

标签: behat

我运行$ vendor/bin/behat --init

我明白了:

<?php

use Behat\Behat\Context\Context;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;

/**
 * Defines application features from the specific context.
 */
class FeatureContext implements Context
{
    /**
     * Initializes context.
     *
     * Every scenario gets its own context instance.
     * You can also pass arbitrary arguments to the
     * context constructor through behat.yml.
     */
    public function __construct()
    {
    }
}

但是documentation显示如下:

<?php
// features/bootstrap/FeatureContext.php

use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;

class FeatureContext implements SnippetAcceptingContext
{
    /**
     * Initializes context.
     */
    public function __construct()
    {
    }
}

我不确定这是因为我没有behat.yml文件还是其他问题。

它总是给我这个错误:

  `FeatureContext` context class not found and can not be used. 

谢谢

奥斯卡

0 个答案:

没有答案