Skip to content

Commit

Permalink
"target_path" hotfix applied.
Browse files Browse the repository at this point in the history
  • Loading branch information
kidunot89 committed Jun 2, 2021
1 parent ce08b71 commit 466e157
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/TestCase/WPGraphQLTestCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 466e157

Please sign in to comment.