From: scribu Date: Sun, 17 Feb 2013 02:14:02 +0000 (+0200) Subject: throw stream output instead of using assertEquals() X-Git-Tag: v0.9.0~86^2~9 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b3683376126a24a7bde0e354cf1bdcfba79dbc50;p=wvm%2Fwvm.git throw stream output instead of using assertEquals() --- diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index daaa5ab3..87661bfa 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -148,7 +148,11 @@ class FeatureContext extends BehatContext */ public function outputShouldBe( $stream, PyStringNode $output ) { - assertEquals( (string) $output, rtrim( $this->result->$stream, "\n" ) ); + $result = rtrim( $this->result->$stream, "\n" ); + + if ( (string) $output != $result ) { + throw new \Exception( $this->result->$stream ); + } } /**