Skip to:
Content

BuddyPress.org

Changeset 9481


Ignore:
Timestamp:
02/13/2015 04:20:10 PM (5 years ago)
Author:
boonebgorges
Message:

Stop skipping tests attached to unclosed Trac tickets.

Fixes #6223.

File:
1 edited

Legend:

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

    r9471 r9481  
    288288    }
    289289
    290     protected function checkRequirements() {
    291         if ( WP_TESTS_FORCE_KNOWN_BUGS )
    292             return;
    293 
    294         parent::checkRequirements();
    295 
    296         $tickets = PHPUnit_Util_Test::getTickets( get_class( $this ), $this->getName( false ) );
    297         foreach ( $tickets as $ticket ) {
    298             if ( 'BP' == substr( $ticket, 0, 2 ) ) {
    299                 $ticket = substr( $ticket, 2 );
    300                 if ( $ticket && is_numeric( $ticket ) )
    301                     $this->knownBPBug( $ticket );
    302             }
    303         }
    304     }
    305 
    306     /**
    307      * Skips the current test if there is an open BuddyPress ticket with id $ticket_id
    308      */
    309     function knownBPBug( $ticket_id ) {
    310         if ( WP_TESTS_FORCE_KNOWN_BUGS || in_array( $ticket_id, self::$forced_tickets ) )
    311             return;
    312 
    313         $trac_url = 'https://buddypress.trac.wordpress.org';
    314 
    315         // When SSL is not available, use non-SSL mirror
    316         // Primarily for travis-ci PHP 5.2 build
    317         if ( ! extension_loaded( 'openssl' ) ) {
    318             $trac_url = 'http://hardg.com/bp-open-tickets';
    319         }
    320 
    321         if ( ! TracTickets::isTracTicketClosed( $trac_url, $ticket_id ) ) {
    322             $this->markTestSkipped( sprintf( 'BuddyPress Ticket #%d is not fixed', $ticket_id ) );
    323         }
    324     }
    325 
    326290    /**
    327291     * WP's core tests use wp_set_current_user() to change the current
Note: See TracChangeset for help on using the changeset viewer.