From a121804e93dc417a018f193db5e1fd4357744d0d Mon Sep 17 00:00:00 2001 From: Mukesh Panchal Date: Mon, 9 Oct 2023 17:14:58 +0530 Subject: [PATCH] Check pre_ filter --- tests/phpunit/tests/option/networkOption.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/option/networkOption.php b/tests/phpunit/tests/option/networkOption.php index 929bedd6b8538..ff15925062c4b 100644 --- a/tests/phpunit/tests/option/networkOption.php +++ b/tests/phpunit/tests/option/networkOption.php @@ -714,7 +714,7 @@ public function test_update_network_option_should_add_option_with_filtered_defau $default_value = 'default-value'; add_filter( - "default_site_option_{$option}", + "pre_site_option_{$option}", static function () use ( $default_value ) { return $default_value; } @@ -769,7 +769,7 @@ public function test_update_network_option_with_pre_filter_updates_option_with_d add_option( null, 'foo', 1 ); // Force a return value of integer 0. - add_filter( 'default_site_option_foo', '__return_zero' ); + add_filter( 'pre_site_option_foo', '__return_zero' ); /* * This should succeed, since the 'foo' option has a value of 1 in the database. @@ -790,6 +790,6 @@ public function test_update_network_option_maintains_pre_filters() { update_network_option( null, 'foo', 0 ); // Assert that the filter is still present. - $this->assertSame( 10, has_filter( 'default_site_option_foo', '__return_zero' ) ); + $this->assertSame( 10, has_filter( 'pre_site_option_foo', '__return_zero' ) ); } }