Skip to content

Commit 85d56b6

Browse files
committed
Clean up Hooks static vard on tear down
See Brain-WP#6
1 parent 6b40fa1 commit 85d56b6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Monkey.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,18 @@ public static function setUpWP()
7171
*/
7272
public static function tearDown()
7373
{
74+
Functions::__flush();
7475
Patchwork\undoAll();
7576
Mockery::close();
76-
Functions::__flush();
7777
}
7878

7979
/**
8080
* Clean up Functions and Hooks statics: is always needed when using this class.
8181
*/
8282
public static function tearDownWP()
8383
{
84-
self::tearDown();
8584
Hooks::tearDown();
85+
self::tearDown();
8686
}
8787

8888
/**

src/Monkey/WP/Hooks.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public static function tearDown()
139139
self::$instances[self::FILTER] = null;
140140
}
141141
self::$instances = [];
142+
self::$names = [];
142143
self::$current = null;
143144
}
144145

0 commit comments

Comments
 (0)