has anybody encountered the following problem: behat apparently works fine, but it has no predefined steps: the result of
\tests> php .\behat\behat.phar -di
is empty even the file FeatureContext.php has no steps defined.
My behat version is 2.4.0, it has been istalled with the help of PHAR, PHP Version is 5.4.9.
Below are some details of my installation. The tree structure is as follows:
tests> dir
Directory: xxx\tests
Mode Name
d---- behat
d---- features
-a--- bootstrap.php
-a--- phpunit.xml
-a--- WebTestCase.php
behat folder contains the following files:
tests> dir .\behat
Directory: xxx\tests\behat
Mode Name
-a--- behat.phar
-a--- mink.phar
-a--- mink_extension.phar
while feature folder has only bootstrap directory
tests> dir .\features
Directory: xxx\tests\features
Mode Name
d---- bootstrap
which contains the only file FeatureContext.php with the following content
<?php
use Behat\Behat\Context\ClosuredContextInterface,
Behat\Behat\Context\TranslatedContextInterface,
Behat\Behat\Context\BehatContext,
Behat\Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode,
Behat\Gherkin\Node\TableNode;
class FeatureContext extends BehatContext
{
public function __construct(array $parameters)
{
// Initialize your context here
}
}