We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d92813 commit 76c4db7Copy full SHA for 76c4db7
1 file changed
tests/phpunit/tests/block-template.php
@@ -11,9 +11,13 @@
11
class Block_Template_Test extends WP_UnitTestCase {
12
private static $post;
13
14
+ private static $previous_theme;
15
+
16
private static $template_canvas_path = ABSPATH . WPINC . '/template-canvas.php';
17
18
public static function wpSetUpBeforeClass() {
19
+ self::$previous_theme = get_stylesheet();
20
21
switch_theme( 'block-theme' );
22
23
// Set up custom template post.
@@ -35,6 +39,8 @@ public static function wpSetUpBeforeClass() {
35
39
36
40
public static function wpTearDownAfterClass() {
37
41
wp_delete_post( self::$post->ID );
42
43
+ switch_theme( self::$previous_theme );
38
44
}
45
46
public function tear_down() {
0 commit comments