mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-09-29 20:59:39 +02:00
Merge pull request #26 from srizzling/master
Added a step for creating a breakpoint
This commit is contained in:
commit
b0af00bf9d
@ -421,6 +421,20 @@ JS;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pauses the scenario until the user presses a key. Useful when debugging a scenario.
|
||||||
|
*
|
||||||
|
* @Then /^(?:|I )put a breakpoint$/
|
||||||
|
*/
|
||||||
|
public function iPutABreakpoint()
|
||||||
|
{
|
||||||
|
fwrite(STDOUT, "\033[s \033[93m[Breakpoint] Press \033[1;93m[RETURN]\033[0;93m to continue...\033[0m");
|
||||||
|
while (fgets(STDIN, 1024) == '') {}
|
||||||
|
fwrite(STDOUT, "\033[u");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transforms relative time statements compatible with strtotime().
|
* Transforms relative time statements compatible with strtotime().
|
||||||
* Example: "time of 1 hour ago" might return "22:00:00" if its currently "23:00:00".
|
* Example: "time of 1 hour ago" might return "22:00:00" if its currently "23:00:00".
|
||||||
|
Loading…
Reference in New Issue
Block a user