diff --git a/tests/phpunit/tests/rest-api/rest-schema-setup.php b/tests/phpunit/tests/rest-api/rest-schema-setup.php index eea2224331..360a075c8e 100644 --- a/tests/phpunit/tests/rest-api/rest-schema-setup.php +++ b/tests/phpunit/tests/rest-api/rest-schema-setup.php @@ -293,11 +293,8 @@ class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase { } } - if ( is_multisite() ) { - echo "Skipping generation of API client fixtures in multisite mode.\n"; - } else if ( version_compare( PHP_VERSION, '5.4', '<' ) ) { - echo "Skipping generation of API client fixtures due to unsupported JSON_* constants.\n"; - } else { + // Only generate API client fixtures in single site and when required JSON_* constants are supported. + if ( ! is_multisite() && version_compare( PHP_VERSION, '5.4', '>=' ) ) { // Save the route object for QUnit tests. $file = './tests/qunit/fixtures/wp-api-generated.js'; file_put_contents( $file, $mocked_responses );