Changeset 167
- Timestamp:
- 05/25/08 13:41:00 (8 months ago)
- Files:
-
- 1 modified
-
trunk/src/Stagehand/TestRunner.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Stagehand/TestRunner.php
r166 r167 150 150 151 151 Options: 152 -h display this help and exit 153 -V display version information and exit 154 -R run tests recursively 155 -c color the result of a test runner run 156 -p <file> preload <file> as a PHP script 157 -a watch for changes in one or more directories and run tests in the test directory recursively when changes are detected (autotest) 158 -w <directory1,directory2,...> specify one or more directories to be watched for changes 159 -g notify test results to Growl 152 -h display this help and exit 153 -V display version information and exit 154 -R run tests recursively 155 -c color the result of a test runner run 156 -p <file> preload <file> as a PHP script 157 -a watch for changes in one or more directories 158 and run tests in the test directory 159 recursively when changes are detected 160 (autotest) 161 -w <directory1,directory2,...> specify one or more directories to be watched 162 for changes 163 -g notify test results to Growl 164 --growl-password=<password> specify <password> for Growl 160 165 161 166 With no [directory or file], run all tests in the current directory. … … 249 254 } 250 255 256 if (!is_null($this->_config->growlPassword)) { 257 $options[] = "--growl-password={$this->_config->growlPassword}"; 258 } 259 251 260 $options[] = $this->_config->directory; 252 261 … … 278 287 array_shift($argv); 279 288 PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); 280 $allOptions = Console_Getopt::getopt2($argv, 'hVRcp:aw:g'); 289 $allOptions = Console_Getopt::getopt2($argv, 290 'hVRcp:aw:g', 291 array('growl-password=') 292 ); 281 293 PEAR::staticPopErrorHandling(); 282 294 if (PEAR::isError($allOptions)) { … … 291 303 $targetDirectories = array(); 292 304 $useGrowl = false; 305 $growlPassword = null; 293 306 foreach ($allOptions as $options) { 294 307 if (!count($options)) { … … 327 340 } 328 341 break; 342 case '--growl-password': 343 $growlPassword = $option[1]; 344 break; 329 345 } 330 346 } else { … … 340 356 'preloadFile' => $preloadFile, 341 357 'targetDirectories' => $targetDirectories, 342 'useGrowl' => $useGrowl 358 'useGrowl' => $useGrowl, 359 'growlPassword' => $growlPassword 343 360 ); 344 361 } … … 369 386 $notification = $runner->getNotification(); 370 387 $application = new Net_Growl_Application('Stagehand_TestRunner', 371 array('Green', 'Red') 388 array('Green', 'Red'), 389 $this->_config->growlPassword 372 390 ); 373 391 $growl = new Net_Growl($application);
