Make WordPress Core

Ticket #27114: ticket-27114-tests-openssl.patch

File ticket-27114-tests-openssl.patch, 778 bytes (added by bpetty, 11 years ago)
  • tests/phpunit/includes/trac.php

    diff --git tests/phpunit/includes/trac.php tests/phpunit/includes/trac.php
    index 70b56a0..25be036 100644
    class TracTickets { 
    1414         * @return bool|null true if the ticket is resolved, false if not resolved, null on error
    1515         */
    1616        public static function isTracTicketClosed( $trac_url, $ticket_id ) {
     17                if ( ! extension_loaded('openssl') )
     18                        $trac_url = preg_replace("/^https:/", "http:", $trac_url);
     19
    1720                if ( ! isset( self::$trac_ticket_cache[ $trac_url ] ) ) {
    1821                        // In case you're running the tests offline, keep track of open tickets.
    1922                        $file = DIR_TESTDATA . '/.trac-ticket-cache.' . str_replace( array( 'http://', 'https://', '/' ), array( '', '', '-' ), rtrim( $trac_url, '/' ) );