Skip to content

Commit

Permalink
Fix possible leaking tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dpanta94 committed Jun 20, 2024
1 parent fa48149 commit cb700c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/wpunit/AssetsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public function tearDown() {
*/
public function unset_uopz_redefines() {
if ( function_exists( 'uopz_redefine' ) ) {
// Restore in reverse order.
self::$uopz_redefines = array_reverse( self::$uopz_redefines );

foreach ( self::$uopz_redefines as $restore_callback ) {
$restore_callback();
}
Expand Down

0 comments on commit cb700c8

Please sign in to comment.