WordPress.org

Make WordPress Core

Changeset 896 in tests for trunk/includes/testcase.php


Ignore:
Timestamp:
07/09/2012 04:12:47 PM (9 years ago)
Author:
nacin
Message:

Remove ability to provide an extra description to the @ticket annotation, added in [984].

This extra text causes problems when you try to use a ticket # as a group name, which phpunit supports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/testcase.php

    r894 r896  
    125125        $tickets = PHPUnit_Util_Test::getTickets( get_class( $this ), $this->getName() );
    126126        foreach ( $tickets as $ticket ) {
    127             $annotation = explode( ' ', $ticket, 2 );
    128             $ticket     = $annotation[0];
    129             $message    = isset( $annotation[1] ) ? $annotation[1] : '';
    130 
    131127            if ( is_numeric( $ticket ) ) {
    132                 $this->knownWPBug( $ticket, $message );
     128                $this->knownWPBug( $ticket );
    133129            } elseif ( 'UT' == substr( $ticket, 0, 2 ) ) {
    134                 $this->knownUTBug( substr( $ticket, 2 ), $message );
     130                $this->knownUTBug( substr( $ticket, 2 ) );
    135131            }
    136132        }
     
    140136     * Skips the current test if there is an open WordPress ticket with id $ticket_id
    141137     */
    142     function knownWPBug( $ticket_id, $message = '' ) {
     138    function knownWPBug( $ticket_id ) {
    143139        if ( ! WP_TESTS_FORCE_KNOWN_BUGS && ! TracTickets::isTracTicketClosed( 'http://core.trac.wordpress.org', $ticket_id ) ) {
    144             $this->markTestSkipped( sprintf( 'WordPress Ticket #%d is not fixed', $ticket_id ) . "\n" . $message );
     140            $this->markTestSkipped( sprintf( 'WordPress Ticket #%d is not fixed', $ticket_id ) );
    145141        }
    146142    }
     
    149145     * Skips the current test if there is an open unit tests ticket with id $ticket_id
    150146     */
    151     function knownUTBug( $ticket_id, $message = '' ) {
     147    function knownUTBug( $ticket_id ) {
    152148        if ( ! WP_TESTS_FORCE_KNOWN_BUGS && ! TracTickets::isTracTicketClosed( 'http://unit-tests.trac.wordpress.org', $ticket_id ) ) {
    153             $this->markTestSkipped( sprintf( 'Unit Tests Ticket #%d is not fixed', $ticket_id ) . "\n" . $message );
     149            $this->markTestSkipped( sprintf( 'Unit Tests Ticket #%d is not fixed', $ticket_id ) );
    154150        }
    155151    }
     
    158154     * Skips the current test if there is an open plugin ticket with id $ticket_id
    159155     */
    160     function knownPluginBug( $ticket_id, $message = '' ) {
     156    function knownPluginBug( $ticket_id ) {
    161157        if ( ! WP_TESTS_FORCE_KNOWN_BUGS && ! TracTickets::isTracTicketClosed( 'http://plugins.trac.wordpress.org', $ticket_id ) ) {
    162             $this->markTestSkipped( sprintf( 'WordPress Plugin Ticket #%d is not fixed', $ticket_id ) . "\n" . $message );
     158            $this->markTestSkipped( sprintf( 'WordPress Plugin Ticket #%d is not fixed', $ticket_id ) );
    163159        }
    164160    }
Note: See TracChangeset for help on using the changeset viewer.