Skip to:
Content

bbPress.org

Changeset 5671


Ignore:
Timestamp:
04/03/2015 09:09:55 AM (11 years ago)
Author:
netweb
Message:

Remove BBP_UnitTestCase::knownBBPBug PHPUnit tests support for bbPress unclosed Trac tickets.

See #WP30284 and #BuddyPress6223

File:
1 edited

Legend:

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

    r5610 r5671  
    269269    }
    270270
    271     protected function checkRequirements() {
    272 
    273         if ( WP_TESTS_FORCE_KNOWN_BUGS ) {
    274             return;
    275         }
    276 
    277         parent::checkRequirements();
    278 
    279         $tickets = PHPUnit_Util_Test::getTickets( get_class( $this ), $this->getName( false ) );
    280         foreach ( $tickets as $ticket ) {
    281             if ( 'BBP' == substr( $ticket, 0, 2 ) ) {
    282                 $ticket = substr( $ticket, 2 );
    283                 if ( $ticket && is_numeric( $ticket ) ) {
    284                     $this->knownBPBug( $ticket );
    285                 }
    286             }
    287         }
    288     }
    289 
    290     /**
    291      * Skips the current test if there is an open BuddyPress ticket with id $ticket_id
    292      */
    293     function knownBBPBug( $ticket_id ) {
    294         if ( WP_TESTS_FORCE_KNOWN_BUGS || in_array( $ticket_id, self::$forced_tickets ) ) {
    295             return;
    296         }
    297 
    298         $trac_url = 'https://bbpress.trac.wordpress.org';
    299 
    300         // When SSL is not available, use non-SSL mirror
    301         // Primarily for travis-ci PHP 5.2 build
    302         if ( !extension_loaded( 'openssl' ) ) {
    303             $trac_url = '';
    304             return;
    305         }
    306 
    307         if ( !TracTickets::isTracTicketClosed( $trac_url, $ticket_id ) ) {
    308             $this->markTestSkipped( sprintf( 'bbPress Ticket #%d is not fixed', $ticket_id ) );
    309         }
    310     }
    311 
    312271    /**
    313272     * WP's core tests use wp_set_current_user() to change the current
Note: See TracChangeset for help on using the changeset viewer.