mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-15 23:25:50 +01:00
b25d41d205
Add QUnit tests: verify that wp-api loads correctly, verify that the expected base models and collections exist and can be instantiated, verify that collections contain the correct models, verify that expected helper functions are in place for each collection. The QUnit tests rely on two fixture files: `tests/qunit/fixtures/wp-api-generated.js` contains the data response from each core endpoint and is generated by running the PHPUnit `restapi-jsclient` group. `tests/qunit/fixtures/wp-api.js` maps the generated data to endpoint routes, and overrides `Backbone.ajax` to mock the responses for the tests. Add PHPUnit tests in `tests/phpunit/tests/rest-api/rest-schema-setup.php`. First, verify that the API returns the expected routes via `server->get_routes()`. Then, the `test_build_wp_api_client_fixtures` test goes thru each endpoint and requests it from the API, tests that it returns data, and builds up the data for the mocked QUnit tests, saving the final results to `tests/qunit/fixtures/wp-api-generated.js`. Add a new grunt task `restapi-jsclient` which runs the phpunit side data generation and the qunit tests together. Props jnylen0, welcher, adamsilverstein, netweb, ocean90, rachelbaker. Merges [40058], [40061], [40065], [40066], [40077], and [40104] to the 4.7 branch. Fixes #39264. Built from https://develop.svn.wordpress.org/branches/4.7@40116 git-svn-id: http://core.svn.wordpress.org/branches/4.7@40053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
36 lines
631 B
PHP
36 lines
631 B
PHP
<?php
|
|
/**
|
|
* The WordPress version string
|
|
*
|
|
* @global string $wp_version
|
|
*/
|
|
$wp_version = '4.7.3-alpha-40116';
|
|
|
|
/**
|
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
|
*
|
|
* @global int $wp_db_version
|
|
*/
|
|
$wp_db_version = 38590;
|
|
|
|
/**
|
|
* Holds the TinyMCE version
|
|
*
|
|
* @global string $tinymce_version
|
|
*/
|
|
$tinymce_version = '4403-20160901';
|
|
|
|
/**
|
|
* Holds the required PHP version
|
|
*
|
|
* @global string $required_php_version
|
|
*/
|
|
$required_php_version = '5.2.4';
|
|
|
|
/**
|
|
* Holds the required MySQL version
|
|
*
|
|
* @global string $required_mysql_version
|
|
*/
|
|
$required_mysql_version = '5.0';
|