Skip to:
Content

BuddyPress.org

Changeset 9053


Ignore:
Timestamp:
09/27/2014 10:51:53 PM (5 years ago)
Author:
boonebgorges
Message:

During unit tests, use non-SSL mirror for Trac ticket cache when openssl is not enabled

This change is necessary to ensure that tests against open tickets are
properly skipped when running the test suite in environment where openssl is
not available (due to a change in wordpress.org infrastructure that forces all
traffic over SSL). It's primarily an issue on travis-ci's PHP 5.2 build, but
could arise in any situation where PHP was not built with openssl support.

This fallback can be removed when PHP 5.2.x support is dropped at some point in
the future.

Fixes #5910

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase.php

    r9022 r9053  
    282282            return;
    283283
    284         if ( ! TracTickets::isTracTicketClosed( 'https://buddypress.trac.wordpress.org', $ticket_id ) ) {
     284        $trac_url = 'https://buddypress.trac.wordpress.org';
     285
     286        // When SSL is not available, use non-SSL mirror
     287        // Primarily for travis-ci PHP 5.2 build
     288        if ( ! extension_loaded( 'openssl' ) ) {
     289            $trac_url = 'http://hardg.com/bp-open-tickets';
     290        }
     291
     292        if ( ! TracTickets::isTracTicketClosed( $trac_url, $ticket_id ) ) {
    285293            $this->markTestSkipped( sprintf( 'BuddyPress Ticket #%d is not fixed', $ticket_id ) );
    286294        }
Note: See TracChangeset for help on using the changeset viewer.