Added a step for creating a breakpoint

This commit is contained in:
Sriram Venkatesh 2014-02-12 15:09:19 +13:00
parent aa73fff37c
commit f7125a9eff

View File

@ -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().
* Example: "time of 1 hour ago" might return "22:00:00" if its currently "23:00:00".