public function __construct($run_from_commandline = false) { if ($run_from_commandline) { $this->init_constants(); echo "Bootstrapping Testing System by Testing Autoloader...\n"; $bootstrap_test = $this->bootstrap_test_autoloader(); if ($bootstrap_test->tests_failed) { echo "Bootstrap Fail, stopping subsequent tests.\n"; echo "=== DEBUG ===\n"; echo $bootstrap_test->output; exit; } else { echo "Bootstrap Pass, continuing...\n"; } echo "Running TethAutoloader::init()\n"; TethAutoloader::init(); echo "Running TethAutoloader::register_classes()\n"; TethAutoloader::register_classes(array(SITE_DIR)); $this->test_classes = $this->scan_classes(TethAutoloader::$classes); echo "Found " . count($this->test_classes) . " test classes ...\n"; $this->run_tests(); } }
<?php define("SITE_DIR", realpath(dirname(__FILE__) . "/../") . "/"); require SITE_DIR . '/teth/TethAutoloader.php'; TethAutoloader::init(); TethAutoloader::go();
public function init() { $ret = true; TethAutoloader::init(); //did autoloader register itself as loaded? if (TethAutoloader::$loaded['Autoloader'] != TethAutoloader::path_to('autoloader')) { $this->results['init']['autoloader_loaded'] = $ret = false; } else { $this->results['init']['autoloader_loaded'] = true; } $this->results['init']['register_inis'] = false; $this->results['init']['pre_init_hooks'] = false; $this->results['init']['register_classes'] = false; return $ret; }