mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-27 19:47:42 +01:00
f52bf291cb
Splits the tests in the `tests/phpunit/tests/compat.php` file up into individual test classes for each function being tested. Improvements to individual test cases: * Adds `@covers` tags. * Adds visibility modifiers to all methods. * Adds function availability test. * Where relevant, fixes the assertion parameter order. * Data provider: * Where relevant, reworks a test to use a data provider. * Where relevant, renames data provider methods to have a more obvious link to the test it applies to. * Makes the data provider more readable by adding keys within the data sets. * Moves the data provider below its associated tests. * Adds/removes data sets in data providers. * Makes the actual test code more readable by using descriptive variables and multi-line function calls. * Adds the `$message` parameter to all assertions when a test method contains more than one assertion. Specifically for the `_mb_substr()` tests: * Splits the `test_mb_substr_phpcore()` method into two test methods based on the PHP Core test files they are emulating. * Makes the actual test code within the `test_mb_substr_phpcore_basic()` method more readable by using descriptive variables and multi-line function calls. * Splits the data used for the second part of the `test_mb_substr_phpcore()` function, now `test_mb_substr_phpcore_input_type_handling()`, off into a separate data provider with named data sets. * Removes duplicate data sets from the `data_mb_substr_phpcore_input_type_handling()`. * Why? The PHP native tests test against upper/lowercase `false`, `true`, `null` and some other text string single quote/double quote variations. As things were, those differentiations had been undone when the coding standards were put in place, so in effect those weren't being tested anymore. And as this is userland code, there's no point in adding these differentiations back as they will be handled the same by PHP anyway (and that is safeguarded via the PHP native tests). * Removes the "undefined variable" and "unset variable" test cases as, while those are relevant to the C code in which PHP is written, they are not relevant for testing userland code and will behave the same as the test passing `null`. Follow-to [25002], [32364], [42228], [42343], [43034], [43036], [43220], [43571], [45607], [47122], [47198], [48937], [48996], [51415], [51563], [51594]. Props jrf, hellofromTonya. See #39265, #53363. Built from https://develop.svn.wordpress.org/trunk@51852 git-svn-id: http://core.svn.wordpress.org/trunk@51451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
48 lines
939 B
PHP
48 lines
939 B
PHP
<?php
|
|
/**
|
|
* WordPress Version
|
|
*
|
|
* Contains version information for the current WordPress release.
|
|
*
|
|
* @package WordPress
|
|
* @since 1.2.0
|
|
*/
|
|
|
|
/**
|
|
* The WordPress version string.
|
|
*
|
|
* Holds the current version number for WordPress core. Used to bust caches
|
|
* and to enable development mode for scripts when running from the /src directory.
|
|
*
|
|
* @global string $wp_version
|
|
*/
|
|
$wp_version = '5.9-alpha-51852';
|
|
|
|
/**
|
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
|
*
|
|
* @global int $wp_db_version
|
|
*/
|
|
$wp_db_version = 49752;
|
|
|
|
/**
|
|
* Holds the TinyMCE version.
|
|
*
|
|
* @global string $tinymce_version
|
|
*/
|
|
$tinymce_version = '49110-20201110';
|
|
|
|
/**
|
|
* Holds the required PHP version.
|
|
*
|
|
* @global string $required_php_version
|
|
*/
|
|
$required_php_version = '5.6.20';
|
|
|
|
/**
|
|
* Holds the required MySQL version.
|
|
*
|
|
* @global string $required_mysql_version
|
|
*/
|
|
$required_mysql_version = '5.0';
|