Skip to content

Instantly share code, notes, and snippets.

@varas
Created April 8, 2014 15:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save varas/10140573 to your computer and use it in GitHub Desktop.
Save varas/10140573 to your computer and use it in GitHub Desktop.
Catch PhpUnit assert errors with PsyShell REPL for live debugging
testX()
{
try {
...
} catch(\Exception $e) {
if (get_class($e) != 'PHPUnit_Framework_ExpectationFailedException')
Psy\Shell::debug(array('v' => get_defined_vars()));
throw($e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment