Created
February 13, 2011 17:08
-
-
Save everzet/824845 to your computer and use it in GitHub Desktop.
how to make verbose "equals" assertions in Behat with PHPUnit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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