From 8ce2218e5de019d2a6b87a119cff7c4185120ee8 Mon Sep 17 00:00:00 2001 From: Noah Allen Date: Wed, 21 Feb 2024 17:02:56 -0800 Subject: [PATCH] Fix unit test --- tests/files/test-vip-filesystem.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/files/test-vip-filesystem.php b/tests/files/test-vip-filesystem.php index f070fedecc5..9c6938e5962 100644 --- a/tests/files/test-vip-filesystem.php +++ b/tests/files/test-vip-filesystem.php @@ -4,7 +4,6 @@ use Automattic\Test\Constant_Mocker; use ErrorException; -use Parsely\RemoteAPI\Base_Endpoint_Remote; use WP_Error; use WP_Filesystem_Base; use WP_Filesystem_Direct; @@ -394,10 +393,8 @@ public function test_wp_font_dir() { $this->assertEquals( true, true ); return; } - // Simulate filter behavior which happens during upload: - add_filter( 'upload_dir', '\wp_get_font_dir' ); + $font_dir = \wp_get_font_dir(); - remove_filter( 'upload_dir', '\zwp_get_font_dir' ); $this->assertEquals( $font_dir, [ 'path' => 'vip://wp-contentt/uploads/fonts',