Changeset 896 in tests for trunk/includes/testcase.php
- Timestamp:
- 07/09/2012 04:12:47 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/testcase.php
r894 r896 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 131 127 if ( is_numeric( $ticket ) ) { 132 $this->knownWPBug( $ticket , $message);128 $this->knownWPBug( $ticket ); 133 129 } elseif ( 'UT' == substr( $ticket, 0, 2 ) ) { 134 $this->knownUTBug( substr( $ticket, 2 ) , $message);130 $this->knownUTBug( substr( $ticket, 2 ) ); 135 131 } 136 132 } … … 140 136 * Skips the current test if there is an open WordPress ticket with id $ticket_id 141 137 */ 142 function knownWPBug( $ticket_id , $message = '') {138 function knownWPBug( $ticket_id ) { 143 139 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 ) ); 145 141 } 146 142 } … … 149 145 * Skips the current test if there is an open unit tests ticket with id $ticket_id 150 146 */ 151 function knownUTBug( $ticket_id , $message = '') {147 function knownUTBug( $ticket_id ) { 152 148 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 ) ); 154 150 } 155 151 } … … 158 154 * Skips the current test if there is an open plugin ticket with id $ticket_id 159 155 */ 160 function knownPluginBug( $ticket_id , $message = '') {156 function knownPluginBug( $ticket_id ) { 161 157 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 ) ); 163 159 } 164 160 }
Note: See TracChangeset
for help on using the changeset viewer.