From f75bae4bcd092e504f0f6101ee4632cb99f4c3eb Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Fri, 19 Apr 2019 17:10:54 +0200 Subject: [PATCH] Fix return code comparisons --- features/steps/then.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/features/steps/then.php b/features/steps/then.php index 44ec4b8de..1d6c05f5e 100644 --- a/features/steps/then.php +++ b/features/steps/then.php @@ -7,7 +7,10 @@ $steps->Then( '/^the return code should( not)? be (\d+)$/', function ( $world, $not, $return_code ) { - if ( ( ! $not && $return_code !== $world->result->return_code ) || ( $not && $return_code === $world->result->return_code ) ) { + if ( + ( ! $not && (int) $return_code !== $world->result->return_code ) + || ( $not && (int) $return_code === $world->result->return_code ) + ) { throw new RuntimeException( $world->result ); } }