From f35ed94605b18e4719459314cfabe7a398db1653 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Wed, 24 Jan 2018 04:20:26 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/post/query.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/phpunit/tests/post/query.php b/tests/phpunit/tests/post/query.php index 122e956bbb..be27b8b168 100644 --- a/tests/phpunit/tests/post/query.php +++ b/tests/phpunit/tests/post/query.php @@ -647,6 +647,11 @@ class Tests_Post_Query extends WP_UnitTestCase { * @ticket 42860 */ 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( array( 'post_type' => 'wptests_pt', @@ -667,6 +672,11 @@ class Tests_Post_Query extends WP_UnitTestCase { * @ticket 42860 */ 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( array( 'post_type' => 'wptests_pt',