/** * @return stdClass */ private function startContext() { $context = new stdClass(); $context->lastException = null; $context->stack = array(); $context->terminator = AutoloadHandler::create(array($this, 'autoloadTerminator')); $context->className = $this->className; return $this->context = $context; }
/** * Private helper function to create an autoloader that get's automatically cleaned up * after test is over * * @param $callback * @param null $flags * @return AutoloadHandler */ private function create($callback, $flags = null) { $handler = AutoloadHandler::create($callback, $flags); $this->cleanup[] = $handler->getCleanupCallback(); return $handler; }