diff --git a/src/TestCase/WPGraphQLTestCommon.php b/src/TestCase/WPGraphQLTestCommon.php index 92cbacd..8c100d1 100644 --- a/src/TestCase/WPGraphQLTestCommon.php +++ b/src/TestCase/WPGraphQLTestCommon.php @@ -352,7 +352,12 @@ public function assertExpectedErrorFound( array $response, array $expected_data, switch( $type ) { case 'ERROR_PATH': - $target_path = explode( '.', $path ); + $target_path = array_map( + function( $v ) { + return is_numeric( $v ) ? absint( $v ) : $v; + }, + explode( '.', $path ) + ); foreach ( $response['errors'] as $error ) { if ( empty( $error['path'] ) ) { continue;