wrote this file. * As long as you retain this notice you can do whatever you want with * this stuff. If we meet some day, and you think this stuff is worth it, * you can buy me a beer in return. * * @author Sven Strittmatter * @copyright Copyright (c) 2010, Sven Strittmatter. * @version 0.2.0 * @license http://www.weltraumschaf.de/the-beer-ware-license.txt */ /* * Include PHPUnit dependencies */ require_once 'PHPUnit/Framework.php'; require_once 'PHPUnit/Framework/IncompleteTestError.php'; require_once 'PHPUnit/Framework/TestCase.php'; require_once 'PHPUnit/Framework/TestSuite.php'; require_once 'PHPUnit/Extensions/OutputTestCase.php'; require_once 'PHPUnit/Runner/Version.php'; require_once 'PHPUnit/TextUI/TestRunner.php'; require_once 'PHPUnit/Util/Filter.php'; /* * Set error reporting to the level to which Console Library code must comply. */ error_reporting( E_ALL | E_STRICT ); /* * Determine the root, library, and tests directories of the framework * distribution. */ $kapiRoot = realpath(__DIR__ . DIRECTORY_SEPARATOR . '..'); $kapiLibrary = $kapiRoot . '/lib'; $kapiTests = $kapiRoot . '/tests'; /* * Prepend the Console library/ and tests/ directories to the * include_path. This allows the tests to run out of the box and helps prevent * loading other copies of the framework code and tests that would supersede * this copy. */ $includePath = array( $kapiLibrary, $kapiTests, get_include_path() ); set_include_path(implode(PATH_SEPARATOR, $includePath)); /* * Load the user-defined test configuration file, if it exists; otherwise, load * the default configuration. */ if (is_readable($kapiTests . '/TestConfiguration.php')) { require_once $kapiTests . '/TestConfiguration.php'; } else { $msg = 'Cant read test config file: '; $msg .= $kapiTests . '/TestConfiguration.php'; throw new Exception($msg); } /* * Unset global variables that are no longer needed. */ unset($kapiRoot, $kapiLibrary, $kapiTests, $includePath);