From d8087a6205c3f1f2ab9b8ee172dc5cae56b85b76 Mon Sep 17 00:00:00 2001 From: mark kaplun Date: Thu, 25 Apr 2019 19:57:20 +0300 Subject: [PATCH] one more try at fixing travis #246 --- tests/phpunit/tests/rest-api/rest-schema-setup.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/tests/rest-api/rest-schema-setup.php b/tests/phpunit/tests/rest-api/rest-schema-setup.php index 84e34cc63264..1943c41f7274 100644 --- a/tests/phpunit/tests/rest-api/rest-schema-setup.php +++ b/tests/phpunit/tests/rest-api/rest-schema-setup.php @@ -74,7 +74,9 @@ public function mock_embed_request( $preempt, $r, $url ) { public function test_expected_routes_in_schema() { update_option( 'calm_embedding_on', 0 ); - do_action( 'init' ); + global $wp_rest_server; + $wp_rest_server = new Spy_REST_Server; + do_action( 'rest_api_init', $wp_rest_server ); $routes = rest_get_server()->get_routes();