BDD in PHP, Testing search in Wikipedia with Behat and Mink (Selenium2 Driver)
There is one major point that we can do here. In the FeatureContext.php, if class FeatureContext extends MinkContext, then you do not need to write any of the function definitions at all!

Applying what I just said, will result to have FeatureContext.php to be as:

&lt;?php

use Behat\Behat\Tester\Exception\PendingException;
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Behat\MinkExtension\Context\MinkContext; //This line is add

class FeatureContext extends MinkContext // This line is changed
    implements Context, SnippetAcceptingContext
{
    public function __construct()
    {
    }
}


Note: To make the point more clear, I have removed the comments that are generated by behat.