define(\"ENABLE_TESTS\", false) to define(\"ENABLE_TESTS\", true) at the top of runtests.php to enable the test runner, since it could represent a security risk."; die; } if (!defined( "PLOG_CLASS_PATH" )) { define( "PLOG_CLASS_PATH", dirname(__FILE__)."/"); } include_once( PLOG_CLASS_PATH."class/bootstrap.php" ); // if plugins should also be included when testing, let's load them now $folders = Array( TEST_CLASS_FOLDER ); if( INCLUDE_PLUGIN_TESTS ) { $pm =& PluginManager::getPluginManager(); $plugins = $pm->getPluginListFromFolder(); foreach( $plugins as $plugin ) { $folders[] = PLOG_CLASS_PATH."plugins/".$plugin."/class/tests"; } } // create a new TestRunner class, which will take care of loading all our // tests cases, instantiate them and tell PHPUnit to run the tests specified // in the request $r = new TestRunner( $folders ); // check if we're running from the command line $commandLine = isset( $argv ); if( $commandLine ) { if( count( $argv ) < 2 ) { // if running from command line and we have no parameters, show the list of available suites print("\nPlease specify the name of a test suite to run, or 'all' to run all tests in one batch\n\n" ); foreach( $r->getTestSuites() as $suite ) { print( "* [".$suite->getSuiteName()."]: " ); foreach( $suite->getTestMethods() as $method ) { print( $method.", "); } print( "\n" ); } } else { // run the given suite $r->addListener( new ConsoleReporterListener ); $result = $r->run( $argv ); // check the results when ready $reporter = new ConsoleReporter( $result ); print($reporter->generate()); } } else { ?> LifeType Test Suite getTestSuites(); ?>

Available Test Suites

Plese select a test suite to run or click "All" to run all the test suites together.

Suite Run Available methods
getSuiteName()) ?> Run getTestMethods() as $method ) { print( $method.", " ); } ?>
ALL Run  
run( Array( $suiteName )); // check the results when ready $reporter = new HTMLReporter( $result ); print($reporter->generate()); } ?>