From 1eb8a6f5fd167f4aeca601503ab082e05610fbc4 Mon Sep 17 00:00:00 2001 From: Matias Benedetto Date: Mon, 25 Sep 2023 15:47:13 -0300 Subject: [PATCH 1/2] fix deprecated call --- .../fonts/font-library/wpRestFontLibraryController/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit/tests/fonts/font-library/wpRestFontLibraryController/base.php b/phpunit/tests/fonts/font-library/wpRestFontLibraryController/base.php index f1e712bab85b4..d794791abba49 100644 --- a/phpunit/tests/fonts/font-library/wpRestFontLibraryController/base.php +++ b/phpunit/tests/fonts/font-library/wpRestFontLibraryController/base.php @@ -29,6 +29,6 @@ public function tear_down() { $reflection = new ReflectionClass( 'WP_Font_Library' ); $property = $reflection->getProperty( 'collections' ); $property->setAccessible( true ); - $property->setValue( array() ); + $property->setValue( null, array() ); } } From 0580022db37a96419d4f102eb5a67ceb2bec3e3b Mon Sep 17 00:00:00 2001 From: Matias Benedetto Date: Mon, 25 Sep 2023 22:24:29 -0300 Subject: [PATCH 2/2] removing unwanted line --- .../fonts/font-library/wpRestFontLibraryController/base.php | 1 - 1 file changed, 1 deletion(-) diff --git a/phpunit/tests/fonts/font-library/wpRestFontLibraryController/base.php b/phpunit/tests/fonts/font-library/wpRestFontLibraryController/base.php index a03710190b662..a6b02f38a5e81 100644 --- a/phpunit/tests/fonts/font-library/wpRestFontLibraryController/base.php +++ b/phpunit/tests/fonts/font-library/wpRestFontLibraryController/base.php @@ -40,7 +40,6 @@ public function tear_down() { $property = $reflection->getProperty( 'collections' ); $property->setAccessible( true ); $property->setValue( null, array() ); - $property->setValue( array() ); // Clean up the /fonts directory. foreach ( $this->files_in_dir( static::$fonts_dir ) as $file ) {