diff --git a/tests/phpunit/includes/abstract-testcase.php b/tests/phpunit/includes/abstract-testcase.php index 49dfc0fef7..3cfe3991ea 100644 --- a/tests/phpunit/includes/abstract-testcase.php +++ b/tests/phpunit/includes/abstract-testcase.php @@ -503,10 +503,12 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Adapter_TestCase { } add_action( 'deprecated_function_run', array( $this, 'deprecated_function_run' ) ); add_action( 'deprecated_argument_run', array( $this, 'deprecated_function_run' ) ); + add_action( 'deprecated_file_included', array( $this, 'deprecated_function_run' ) ); add_action( 'deprecated_hook_run', array( $this, 'deprecated_function_run' ) ); add_action( 'doing_it_wrong_run', array( $this, 'doing_it_wrong_run' ) ); add_action( 'deprecated_function_trigger_error', '__return_false' ); add_action( 'deprecated_argument_trigger_error', '__return_false' ); + add_action( 'deprecated_file_trigger_error', '__return_false' ); add_action( 'deprecated_hook_trigger_error', '__return_false' ); add_action( 'doing_it_wrong_trigger_error', '__return_false' ); } diff --git a/tests/phpunit/tests/compat/jsonEncodeDecode.php b/tests/phpunit/tests/compat/jsonEncodeDecode.php index 475af85b9f..be51c6022b 100644 --- a/tests/phpunit/tests/compat/jsonEncodeDecode.php +++ b/tests/phpunit/tests/compat/jsonEncodeDecode.php @@ -8,7 +8,15 @@ class Tests_Compat_jsonEncodeDecode extends WP_UnitTestCase { public function test_json_encode_decode() { - $this->expectDeprecation(); + $this->setExpectedDeprecated( 'class-json.php' ); + $this->setExpectedDeprecated( 'Services_JSON::__construct' ); + $this->setExpectedDeprecated( 'Services_JSON::encodeUnsafe' ); + $this->setExpectedDeprecated( 'Services_JSON::_encode' ); + $this->setExpectedDeprecated( 'Services_JSON::reduce_string' ); + $this->setExpectedDeprecated( 'Services_JSON::decode' ); + $this->setExpectedDeprecated( 'Services_JSON::isError' ); + $this->setExpectedDeprecated( 'Services_JSON::strlen8' ); + $this->setExpectedDeprecated( 'Services_JSON::substr8' ); require_once ABSPATH . WPINC . '/class-json.php'; $json = new Services_JSON();