Skip to content

Instantly share code, notes, and snippets.

@everzet
Created February 13, 2011 17:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save everzet/824845 to your computer and use it in GitHub Desktop.
Save everzet/824845 to your computer and use it in GitHub Desktop.
how to make verbose "equals" assertions in Behat with PHPUnit
<?php
$steps->Then('/^it should pass with:$/', function($world, $data) {
try {
assertEquals((string) $data, $world->output);
} catch (\Exception $e) {
$exceptionDiff = \PHPUnit_Framework_TestFailure::exceptionToString($e);
throw new \Exception($exceptionDiff, $e->getCode(), $e);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment