mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 15:05:32 +00:00
Merge pull request #31 from srizzling/session-undefined
[MINOR] Session variable was undefined in Basic Context
This commit is contained in:
commit
7b85ffdcde
@ -606,12 +606,12 @@ JS;
|
|||||||
if(trim($negate)) {
|
if(trim($negate)) {
|
||||||
if (preg_match($regex, $actual)) {
|
if (preg_match($regex, $actual)) {
|
||||||
$message = sprintf('The text "%s" was found in the text of the "%s" region.', $text, $region);
|
$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 {
|
} else {
|
||||||
if (!preg_match($regex, $actual)) {
|
if (!preg_match($regex, $actual)) {
|
||||||
$message = sprintf('The text "%s" was not found anywhere in the text of the "%s" region.', $text, $region);
|
$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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user