From:             sam_bravard at yahoo dot com
Operating system: 
PHP version:      5.0.3
PHP Bug Type:     Feature/Change Request
Bug description:  Add '-run' option to php command line (like java -jar)

Description:
------------
Seems to me it would be great if the php5 command line tool ('php') had an
option to run a static main() method of a specified class just like java
does:

eg:

php -run TTester TObject.php [args]

Which would call the main() in TTester:

TObjectToTest.php:

class TObjectToTest
{
   // ... class that we'll want to test
}

class TTester {

  public static main($args)
  {
     // execute tests on TObjectToTest
  }
}

This would be particularly good for making it easy to bundle  and run
tests on each individual php file.

Thoughts?


-- 
Edit bug report at http://bugs.php.net/?id=32435&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32435&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32435&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32435&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32435&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32435&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32435&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32435&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32435&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32435&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32435&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32435&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32435&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32435&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32435&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32435&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32435&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32435&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32435&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32435&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32435&r=mysqlcfg

Reply via email to