Confusion between BehatContext and MinkContext Confusion between BehatContext and MinkContext symfony symfony

Confusion between BehatContext and MinkContext


Extend the RawMinkContext if you need to access the Mink Session (for browser automation).

Don't use Goutte directly.

BehatContext is a basic context which would be a default choice for most of your own contexts, when you don't need Mink.

MinkContext is a specialized context giving you the access to the Mink session (same as the RawMinkContext). However, it also contains some basic step definitions. That's why you should never extend it, but rather use it as a subcontext. You'd be only able to extend it once, since the step definitions cannot be duplicated.

The question is very similar to your other question (look there for an example of Mink usage): What is wrong with my FeatureContext?

Using Behat doesn't mean you're following BDD. To learn more about it, read the following books:

To read about the tools: