Tests: align mock.php spacing with 3.x-stable branch

Closes gh-5538
This commit is contained in:
Timmy Willison 2024-08-25 09:19:37 -04:00 committed by GitHub
parent dbc9dac7ae
commit d5ae14f6fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -95,9 +95,9 @@ QUnit.assert.ok( true, "mock executed");';
} }
if ( isset( $req->query['array'] ) ) { if ( isset( $req->query['array'] ) ) {
echo '[{"name":"John","age":21},{"name":"Peter","age":25}]'; echo '[ {"name": "John", "age": 21}, {"name": "Peter", "age": 25 } ]';
} else { } else {
echo '{"data":{"lang":"en","length":25}}'; echo '{ "data": {"lang": "en", "length": 25} }';
} }
} }
@ -112,8 +112,8 @@ QUnit.assert.ok( true, "mock executed");';
$callback = $_POST['callback']; $callback = $_POST['callback'];
} }
$json = isset( $req->query['array'] ) ? $json = isset( $req->query['array'] ) ?
'[{"name":"John","age":21},{"name":"Peter","age":25}]' : '[ { "name": "John", "age": 21 }, { "name": "Peter", "age": 25 } ]' :
'{"data":{"lang":"en","length":25}}'; '{ "data": { "lang": "en", "length": 25 } }';
echo cleanCallback( $callback ) . '(' . $json . ')'; echo cleanCallback( $callback ) . '(' . $json . ')';
} }