Horde_Test_AllTests::setup PHP Method

setup() public method

In the default situation this will set the error reporting to E_ALL | E_STRICT and pull in Horde/Test/Autoload.php as autoloading definition. If there is an Autoload.php in $_dir, then only this file will be used. In addition the setup() call will attempt to detect the "lib" directory of the component currently under test and add it to the include_path. This ensures that the component code from the checkout is preferred over whatever else might be available in the default include_path.
public setup ( )
    public function setup()
    {
        // Detect component root and add "lib" and "test" to the include path.
        $base = $this->_dir;
        while ($base != '/' && basename($base) != 'test') {
            $base = dirname($base);
        }
        if ($base) {
            set_include_path($base . PATH_SEPARATOR . $base . '/../lib' . PATH_SEPARATOR . get_include_path());
        }
        require_once 'Horde/Test/Bootstrap.php';
        Horde_Test_Bootstrap::bootstrap($this->_dir);
        if (file_exists($this->_dir . '/Autoload.php')) {
            require_once $this->_dir . '/Autoload.php';
        }
    }