Throw exception if mink has not been set in context

This commit is contained in:
dantleech
2014-12-02 12:51:45 +01:00
parent 2ab8c00c59
commit 541b1462de

View File

@@ -42,6 +42,13 @@ class RawMinkContext implements MinkAwareContext
*/ */
public function getMink() 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; return $this->mink;
} }