Changeset 894 in tests for trunk/includes/testcase.php
- Timestamp:
- 07/09/2012 03:32:24 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/testcase.php
r893 r894 125 125 $tickets = PHPUnit_Util_Test::getTickets( get_class( $this ), $this->getName() ); 126 126 foreach ( $tickets as $ticket ) { 127 $annotation = explode( ' ', $ticket, 2 ); 128 $ticket = $annotation[0]; 129 $message = isset( $annotation[1] ) ? $annotation[1] : ''; 130 127 131 if ( is_numeric( $ticket ) ) { 128 $this->knownWPBug( $ticket );132 $this->knownWPBug( $ticket, $message ); 129 133 } elseif ( 'UT' == substr( $ticket, 0, 2 ) ) { 130 $this->knownUTBug( substr( $ticket, 2 ) );134 $this->knownUTBug( substr( $ticket, 2 ), $message ); 131 135 } 132 136 } … … 136 140 * Skips the current test if there is an open WordPress ticket with id $ticket_id 137 141 */ 138 function knownWPBug( $ticket_id ) {142 function knownWPBug( $ticket_id, $message = '' ) { 139 143 if ( ! WP_TESTS_FORCE_KNOWN_BUGS && ! TracTickets::isTracTicketClosed( 'http://core.trac.wordpress.org', $ticket_id ) ) { 140 $this->markTestSkipped( sprintf( 'WordPress Ticket #%d is not fixed', $ticket_id ) );144 $this->markTestSkipped( sprintf( 'WordPress Ticket #%d is not fixed', $ticket_id ) . "\n" . $message ); 141 145 } 142 146 } … … 145 149 * Skips the current test if there is an open unit tests ticket with id $ticket_id 146 150 */ 147 function knownUTBug( $ticket_id ) {151 function knownUTBug( $ticket_id, $message = '' ) { 148 152 if ( ! WP_TESTS_FORCE_KNOWN_BUGS && ! TracTickets::isTracTicketClosed( 'http://unit-tests.trac.wordpress.org', $ticket_id ) ) { 149 $this->markTestSkipped( sprintf( 'Unit Tests Ticket #%d is not fixed', $ticket_id ) );153 $this->markTestSkipped( sprintf( 'Unit Tests Ticket #%d is not fixed', $ticket_id ) . "\n" . $message ); 150 154 } 151 155 } … … 154 158 * Skips the current test if there is an open plugin ticket with id $ticket_id 155 159 */ 156 function knownPluginBug( $ticket_id ) {160 function knownPluginBug( $ticket_id, $message = '' ) { 157 161 if ( ! WP_TESTS_FORCE_KNOWN_BUGS && ! TracTickets::isTracTicketClosed( 'http://plugins.trac.wordpress.org', $ticket_id ) ) { 158 $this->markTestSkipped( sprintf( 'WordPress Plugin Ticket #%d is not fixed', $ticket_id ) );162 $this->markTestSkipped( sprintf( 'WordPress Plugin Ticket #%d is not fixed', $ticket_id ) . "\n" . $message ); 159 163 } 160 164 }
Note: See TracChangeset
for help on using the changeset viewer.