Changeset 69 in tests
- Timestamp:
- 11/02/2007 06:29:11 AM (18 years ago)
- File:
-
- 1 edited
-
wp-testlib/base.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-testlib/base.php
r57 r69 95 95 #$this->_q_ts = microtime(true); 96 96 #add_filter('query', array(&$this, '_query_filter')); 97 define('SAVEQUERIES', true);97 #define('SAVEQUERIES', true); 98 98 global $wpdb; 99 99 $wpdb->queries = array(); … … 134 134 } 135 135 136 #query_posts($req);137 136 $_SERVER['REQUEST_URI'] = $req; 137 unset($_SERVER['PATH_INFO']); 138 138 $GLOBALS['wp'] =& new WP(); 139 140 // clean out globals to stop them polluting wp and wp_query 141 foreach ($GLOBALS['wp']->public_query_vars as $v) 142 unset($GLOBALS[$v]); 143 foreach ($GLOBALS['wp']->private_query_vars as $v) 144 unset($GLOBALS[$v]); 145 139 146 $GLOBALS['wp']->main($parts['query']); 140 147 } … … 282 289 } 283 290 284 function wptest_run_tests($classes ) {291 function wptest_run_tests($classes, $classname='') { 285 292 $suite = new PHPUnit_Framework_TestSuite(); 286 293 foreach ($classes as $testcase) 287 $suite->addTestSuite($testcase); 294 if (!$classname or strtolower($testcase) == strtolower($classname)) { 295 echo "Adding $testcase\n"; 296 $suite->addTestSuite($testcase); 297 } 288 298 289 299 #return PHPUnit::run($suite);
Note: See TracChangeset
for help on using the changeset viewer.