diff --git a/tests/wpunit/AssetsTest.php b/tests/wpunit/AssetsTest.php index a1b8e73..ae6c686 100644 --- a/tests/wpunit/AssetsTest.php +++ b/tests/wpunit/AssetsTest.php @@ -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(); }