Cleanup tests version checks#2209
Cleanup tests version checks#2209tvlooy wants to merge 3 commits intophp:masterphp/php-src:masterfrom tvlooy:cleanup_tests_versionchecktvlooy/php-src:cleanup_tests_versioncheckCopy head branch name to clipboard
Conversation
|
Comment on behalf of krakjoe at php.net: Labelling |
|
Could I ask that you annotate the patch where files have been deleted with a specific reason (that I or someone else can verify is correct), please ? |
|
About the removed files: These are tests that are skipped if the PHP version is not 6.0, so they are never run: This is a check to make sure the test is skipped with PHP version 6.0. So it is always run: These are tests that are skipped if the PHP version is not lower or equal to 5.2 or 5.3, so they are never run: Do you want me to put a comment in the diff for each of these files pointing to the line with the check? I'm not sure what you mean by annotating the diff. |
| magic_quotes_gpc=1 | ||
| --SKIPIF-- | ||
| <?php if (version_compare(PHP_VERSION, "5.3", "<")) die("skip requires 5.3 or greater"); ?> | ||
| --FILE-- |
|
Looks fine, other than couple of failures on travis that I think shouldn't be there. |
| if (!extension_loaded("phar")) die("skip"); | ||
| if (!extension_loaded("spl")) die("skip SPL not available"); | ||
| if (version_compare(PHP_VERSION, "5.3", "<") or version_compare(PHP_VERSION, "5.4", ">=")) | ||
| die("skip requires 5.3"); |
There was a problem hiding this comment.
I wonder why PHP >= 5.4 was excluded in this test.
|
Merged via 442fd2f. Thanks! |
| } | ||
|
|
||
| if (!(version_compare(PHP_VERSION, '6.0', '==') == 1)) { | ||
| mysqli_query($link, "set names utf8"); |
|
|
||
| /* we need to skip this test in unicode - we send set names utf8 during mysql_connect */ | ||
| if (!(version_compare(PHP_VERSION, '6.0', '==') == 1)) | ||
| mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, $info, $test_counter); |
This is clean-up. Remove all useless version checks from extension tests and remove some code or entire tests that are not valid any more.