REST API: Skip generating the client test fixtures in multisite mode.

There are a couple of changes to the generated API schemas between single-site and multisite mode - for example, the `url` and `email` settings are not present in the settings endpoint (see #39005).

To avoid unexpected changes to the `wp-api-generated.js` fixture file, skip generating the client test fixtures when running the test suite in multisite mode.

See #39264.


git-svn-id: https://develop.svn.wordpress.org/trunk@40077 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
jnylen0 2017-02-18 19:29:24 +00:00
parent 0d73b031c8
commit 127f243bfe
1 changed files with 3 additions and 1 deletions

View File

@ -283,7 +283,9 @@ class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase {
}
}
if ( version_compare( PHP_VERSION, '5.4', '<' ) ) {
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 {
// Save the route object for QUnit tests.