<?php define("SITE_DIR", realpath(dirname(__FILE__) . "/../") . "/"); require SITE_DIR . '/teth/TethAutoloader.php'; TethAutoloader::init(); TethAutoloader::go();
public function go() { $ret = true; $GLOBALS['application_has_run'] = false; $application = Config::$settings['classes']['application']; $backup_components = TethAutoloader::$components; $dir = realpath(dirname(__FILE__) . "/../../"); Config::$settings['classes']['application'] = array('class' => 'TestExampleClass', 'component' => false, 'module' => 'teth-test', 'base' => $dir); TethAutoloader::$classes['TestExampleClass'] = $dir . "/teth-test/TestExampleClass.php"; TethAutoloader::go(); if (!$GLOBALS['application_has_run']) { $this->results['go']['run'] = $ret = false; } else { $this->results['go']['run'] = true; } Config::$settings['classes']['application'] = $application; unset(TethAutoloader::$classes['TestExampleClass']); TethAutoloader::$components = $backup_components; return $ret; }