diff --git a/tests/phpunit/tests/rest-api/restOutputRsd.php b/tests/phpunit/tests/rest-api/restOutputRsd.php new file mode 100644 index 0000000000000..6cecd7cb99789 --- /dev/null +++ b/tests/phpunit/tests/rest-api/restOutputRsd.php @@ -0,0 +1,33 @@ +expectOutputRegex( + '##' + ); + rest_output_rsd(); + } + + /** + * @ticket 65819 + */ + public function test_outputs_nothing_when_rest_url_is_empty() { + add_filter( 'rest_url', '__return_empty_string' ); + + $this->expectOutputString( '' ); + rest_output_rsd(); + } +}