Skip to content

Commit

Permalink
Merge pull request #178 from open-sausages/pulls/1.0/fix-3-7-regression
Browse files Browse the repository at this point in the history
BUG Fix error when running on ss 3.7
  • Loading branch information
robbieaverill authored Jun 2, 2018
2 parents 8bb5ff5 + 3f1f623 commit 35a5f45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/SilverStripe/BehatExtension/Context/BasicContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ public function theTextBeforeAfter($textBefore, $order, $textAfter, $element) {
public function iWaitXUntilISee($wait, $selector) {
$page = $this->getSession()->getPage();

$this->spin(function($page) use ($page, $selector){
$this->spin(function() use ($page, $selector){
$element = $page->find('css', $selector);

if(empty($element)) {
Expand All @@ -864,7 +864,7 @@ public function iWaitXUntilISee($wait, $selector) {
*/
public function iWaitUntilISee($selector) {
$page = $this->getSession()->getPage();
$this->spin(function($page) use ($page, $selector){
$this->spin(function() use ($page, $selector){
$element = $page->find('css', $selector);
if(empty($element)){
return false;
Expand All @@ -885,7 +885,7 @@ public function iWaitUntilISee($selector) {
public function iWaitUntilISeeText($text){
$page = $this->getSession()->getPage();
$session = $this->getSession();
$this->spin(function($page) use ($page, $session, $text) {
$this->spin(function() use ($page, $session, $text) {
$element = $page->find(
'xpath',
$session->getSelectorsHandler()->selectorToXpath("xpath", ".//*[contains(text(), '$text')]")
Expand Down
2 changes: 1 addition & 1 deletion src/SilverStripe/BehatExtension/Context/FixtureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public function stepUpdateRecordState($type, $id, $state) {
\Versioned::reading_stage('Live');
$clone = clone $obj;
$clone->delete();
\Versioned::reading_stage($oldMode);
\Versioned::set_reading_mode($oldMode);
break;
case 'deleted':
$obj->delete();
Expand Down

0 comments on commit 35a5f45

Please sign in to comment.