WordPress.org

Make WordPress Core

Changeset 40826


Ignore:
Timestamp:
05/23/2017 10:15:08 PM (12 months ago)
Author:
obenland
Message:

Themes: Skip tests if ReflectionMethod::setAccessible is unavailable

See [40825].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/theme/customHeader.php

    r40825 r40826  
    125125        $this->assertEmpty( $html );
    126126
     127        // ReflectionMethod::setAccessible is only available in PHP 5.3+
     128        if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
     129            return;
     130        }
    127131        // The container should always be returned in the Customizer preview.
    128132        $this->_set_customize_previewing( true );
     
    206210
    207211    function test_header_script_is_enqueued_by_the_custom_header_markup_without_video_when_previewing_in_customizer() {
     212        if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
     213            $this->markTestSkipped( 'ReflectionMethod::setAccessible is only available in PHP 5.3+' );
     214            return;
     215        }
     216
    208217        $this->_add_theme_support( array( 'video' => true, 'video-active-callback' => '__return_true' ) );
    209218        $this->_set_customize_previewing( true );
Note: See TracChangeset for help on using the changeset viewer.