Changeset 52779
- Timestamp:
- 02/20/2022 10:12:37 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/trac.php
r48115 r52779 10 10 11 11 /** 12 * Checks if track ticket #$ticket_id is resolved12 * Checks if Trac ticket #$ticket_id is resolved. 13 13 * 14 * @return bool|null true if the ticket is resolved, false if not resolved, null on error14 * @return bool|null True if the ticket is resolved, false if not resolved, null on error. 15 15 */ 16 16 public static function isTracTicketClosed( $trac_url, $ticket_id ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid … … 23 23 $file = DIR_TESTDATA . '/.trac-ticket-cache.' . str_replace( array( 'http://', 'https://', '/' ), array( '', '', '-' ), rtrim( $trac_url, '/' ) ); 24 24 $tickets = @file_get_contents( $trac_url . '/query?status=%21closed&format=csv&col=id' ); 25 25 26 // Check if our HTTP request failed. 26 27 if ( false === $tickets ) { … … 38 39 file_put_contents( $file, $tickets ); 39 40 } 40 $tickets = explode( "\r\n", $tickets ); 41 42 $tickets = explode( "\r\n", $tickets ); 43 41 44 self::$trac_ticket_cache[ $trac_url ] = $tickets; 42 45 }
Note: See TracChangeset
for help on using the changeset viewer.