From 2294ee92a2a09eed9f5ff4bba74ae3575d1f2d62 Mon Sep 17 00:00:00 2001 From: Sriram Venkatesh Date: Wed, 9 Apr 2014 13:02:36 +1200 Subject: [PATCH] Session in undefined --- src/SilverStripe/BehatExtension/Context/BasicContext.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SilverStripe/BehatExtension/Context/BasicContext.php b/src/SilverStripe/BehatExtension/Context/BasicContext.php index 7764f43..fbe8d26 100644 --- a/src/SilverStripe/BehatExtension/Context/BasicContext.php +++ b/src/SilverStripe/BehatExtension/Context/BasicContext.php @@ -606,12 +606,12 @@ JS; if(trim($negate)) { if (preg_match($regex, $actual)) { $message = sprintf('The text "%s" was found in the text of the "%s" region.', $text, $region); - throw new \Exception($message, $this->session); + throw new \Exception($message, $this->getSession()); } } else { if (!preg_match($regex, $actual)) { $message = sprintf('The text "%s" was not found anywhere in the text of the "%s" region.', $text, $region); - throw new \Exception($message, $this->session); + throw new \Exception($message, $this->getSession()); } }