Tests: Skip newly added tests from [42581] on PHP 5.2 as they require ReflectionMethod.

See #42860.


git-svn-id: https://develop.svn.wordpress.org/trunk@42585 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2018-01-24 04:20:26 +00:00
parent 67988d5b26
commit f35ed94605
1 changed files with 10 additions and 0 deletions

View File

@ -647,6 +647,11 @@ class Tests_Post_Query extends WP_UnitTestCase {
* @ticket 42860 * @ticket 42860
*/ */
public function test_set_found_posts_fields_posts_is_string() { public function test_set_found_posts_fields_posts_is_string() {
if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
$this->markTestSkipped( 'ReflectionMethod::setAccessible is only available in PHP 5.3+' );
return;
}
$q = new WP_Query( $q = new WP_Query(
array( array(
'post_type' => 'wptests_pt', 'post_type' => 'wptests_pt',
@ -667,6 +672,11 @@ class Tests_Post_Query extends WP_UnitTestCase {
* @ticket 42860 * @ticket 42860
*/ */
public function test_set_found_posts_fields_posts_is_null() { public function test_set_found_posts_fields_posts_is_null() {
if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
$this->markTestSkipped( 'ReflectionMethod::setAccessible is only available in PHP 5.3+' );
return;
}
$q = new WP_Query( $q = new WP_Query(
array( array(
'post_type' => 'wptests_pt', 'post_type' => 'wptests_pt',