Changeset 918 in tests for trunk/bootstrap.php
- Timestamp:
- 07/19/2012 03:51:42 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/bootstrap.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootstrap.php
r890 r918 79 79 require dirname( __FILE__ ) . '/includes/exceptions.php'; 80 80 require dirname( __FILE__ ) . '/includes/utils.php'; 81 82 /** 83 * A child class of the PHP test runner. 84 * 85 * Not actually used as a runner. Rather, used to access the protected 86 * longOptions property, to parse the arguments passed to the script. 87 * 88 * If it is determined that phpunit was called with a --group that corresponds 89 * to an @ticket annotation (such as `phpunit --group 12345` for bugs marked 90 * as #WP12345), then it is assumed that known bugs should not be skipped. 91 * 92 * If WP_TESTS_FORCE_KNOWN_BUGS is already set in wp-tests-config.php, then 93 * how you call phpunit has no effect. 94 */ 95 class WP_PHPUnit_TextUI_Command extends PHPUnit_TextUI_Command { 96 function __construct( $argv ) { 97 $options = PHPUnit_Util_Getopt::getopt( 98 $argv, 99 'd:c:hv', 100 array_keys( $this->longOptions ) 101 ); 102 foreach ( $options[0] as $option ) { 103 if ( $option[0] !== '--group' ) 104 continue; 105 $groups = explode( ',', $option[1] ); 106 foreach ( $groups as $group ) { 107 if ( is_numeric( $group ) || preg_match( '/^(UT|Plugin)\d+$/', $group ) ) 108 WP_UnitTestCase::forceTicket( $group ); 109 } 110 } 111 } 112 } 113 new WP_PHPUnit_TextUI_Command( $_SERVER['argv'] );
Note: See TracChangeset
for help on using the changeset viewer.