diff --git a/src/Behat/MinkExtension/Context/RawMinkContext.php b/src/Behat/MinkExtension/Context/RawMinkContext.php index e7c1726..d07610e 100644 --- a/src/Behat/MinkExtension/Context/RawMinkContext.php +++ b/src/Behat/MinkExtension/Context/RawMinkContext.php @@ -42,6 +42,13 @@ class RawMinkContext implements MinkAwareContext */ public function getMink() { + if (null === $this->mink) { + throw new \RuntimeException( + 'Mink instance has not been set on Mink context class. ' . + 'Have you enabled the Mink Extension?' + ); + } + return $this->mink; }