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 ); } }