Skip to content

Commit

Permalink
Merge pull request #28 from mehamasum/fix/stub-after-restore
Browse files Browse the repository at this point in the history
Forget the name of the global functions on restore
  • Loading branch information
sirbrillig authored Feb 8, 2022
2 parents 099c0c8 + 5f8731f commit 277611a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Spies/GlobalSpies.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ public static function restore_original_global_functions() {
foreach ( array_values( self::$redefined_functions ) as $handle ) {
\Patchwork\restore( $handle );
}

// forget the name of the global functions we already defined.
self::$global_functions = [];
}

public static function call_original_global_function( $function_name, $args ) {
Expand Down

0 comments on commit 277611a

Please sign in to comment.