Esempio n. 1
0
    $arr = explode(LC_DS, realpath(__DIR__ . LC_DS . '..' . LC_DS . '..'));
    array_shift($arr);
    array_shift($arr);
    array_shift($arr);
    array_shift($arr);
    define('SELENIUM_SOURCE_URL', 'http://xcart2-530.crtdev.local/~' . posix_getlogin() . '/' . implode('/', $arr));
    unset($arr);
}
if (!defined('SELENIUM_SERVER')) {
    define('SELENIUM_SERVER', 'cormorant.crtdev.local');
}
if (!defined('TESTS_LOG_DIR')) {
    define('TESTS_LOG_DIR', LC_DIR_VAR . 'log' . LC_DS);
}
if (isset($_SERVER['argv']) && preg_match('/--log-xml\\s+(\\S+)\\s/s', implode(' ', $_SERVER['argv']), $match)) {
    XLite_Tests_MetricWriter::init($match[1] . '.speed');
    unset($match);
}
if (!defined('INCLUDE_ONLY_TESTS') || !preg_match('/DEPLOY_/', constant('INCLUDE_ONLY_TESTS'))) {
    PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist(PATH_ROOT . LC_DS . '.dev');
    PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist(PATH_SRC . LC_DS . 'etc');
    PHP_CodeCoverage_Filter::getInstance()->addDirectoryToWhitelist(PATH_SRC . LC_DS . 'var' . LC_DS . 'run' . LC_DS . 'classes');
    PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist(PATH_SRC . LC_DS . 'var' . LC_DS . 'run' . LC_DS . 'classes' . LC_DS . 'XLite' . LC_DS . 'Model' . LC_DS . 'Proxy');
}
foreach (glob(LC_DIR_ROOT . 'var/log/selenium.*.html') as $f) {
    @unlink($f);
}
/**
 * Class to sort out files gathered by RecursiveIteratorIterator
 *
 * @package    X-Lite_Tests