Beispiel #1
0
 public function tearDown()
 {
     $loader = new \Mutagenesis\Loader();
     $loader->register();
 }
Beispiel #2
0
set_include_path(implode(PATH_SEPARATOR, $path));
if (defined('TESTS_GENERATE_REPORT') && TESTS_GENERATE_REPORT === true && version_compare(PHPUnit_Runner_Version::id(), '3.1.6', '>=')) {
    /*
     * Add Mutagenesis library/ directory to the PHPUnit code coverage
     * whitelist. This has the effect that only production code source files
     * appear in the code coverage report and that all production code source
     * files, even those that are not covered by a test yet, are processed.
     */
    PHPUnit_Util_Filter::addDirectoryToWhitelist($library);
    /*
     * Omit from code coverage reports the contents of the tests directory
     */
    foreach (array('.php', '.phtml', '.csv', '.inc') as $suffix) {
        PHPUnit_Util_Filter::addDirectoryToFilter($tests, $suffix);
    }
    PHPUnit_Util_Filter::addDirectoryToFilter(PEAR_INSTALL_DIR);
    PHPUnit_Util_Filter::addDirectoryToFilter(PHP_LIBDIR);
}
/**
 * Setup autoloaders!
 */
require_once 'Mutagenesis/Loader.php';
$loader = new \Mutagenesis\Loader();
$loader->register();
require_once 'Mockery/Loader.php';
$loader = new \Mockery\Loader();
$loader->register(true);
/*
 * Unset global variables that are no longer needed.
 */
unset($root, $library, $tests, $path);