From 8f0ce253fb203c0486be185741f438b8716296f3 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Thu, 18 Apr 2013 20:35:29 -0700 Subject: [PATCH] Actually fix failing tests. Functions defined inside of functions cause everything to fatal when the parent function is called twice. --- features/steps/basic_steps.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/steps/basic_steps.php b/features/steps/basic_steps.php index 64ab158c..0414f2a5 100644 --- a/features/steps/basic_steps.php +++ b/features/steps/basic_steps.php @@ -281,6 +281,7 @@ function checkThatJsonStringContainsJsonString( $actualJson, $expectedJson ) { return false; } + if ( ! function_exists( 'compareContents' ) ) : function compareContents( $expected, $actual ) { if ( gettype( $expected ) != gettype( $actual ) ) { return false; @@ -304,6 +305,7 @@ function checkThatJsonStringContainsJsonString( $actualJson, $expectedJson ) { return true; } + endif; return compareContents( $expectedValue, $actualValue ); } -- 2.11.0