<commit_before><?php
class Vps_Test_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
{
    protected $autoStop = false;
    protected $_unitTestCookie;
    protected $_domain = null;

    public static function suite($className)
    {
        self::$browsers = array();
        foreach (Vps_Registry::get('config')->server->testBrowser as $b) {
            if (!$b->browser) continue; //deaktiviert
            $b = $b->toArray();
            $b['port'] = (int)$b['port'];
            $b['timeout'] = (int)$b['timeout'];
            self::$browsers[] = $b;
        }
        if (!self::$browsers) {
            throw new Vps_Exception("No test-Browser avaliable");
        }
        return parent::suite($className);
    }

    protected function setUp()
    {
        if (!$cfg = Vps_Registry::get('testServerConfig')) {
            throw new Vps_Exception("testServerConfig not set");
        }
        $d = $this->_domain;
        if (!$d) {
            $domain = $cfg->server->domain;
        } else {
            if (!isset($cfg->vpc->domains->$d)) {
                throw new Vps_Exception("Domain '$d' not found in config");
            }
            $domain = $cfg->vpc->domains->$d->domain;
        }
        $this->setBrowserUrl('http://'.$domain.'/');

        $this->_unitTestCookie = md5(uniqid('testId', true));


        $this->captureScreenshotOnFailure = true;
        $this->screenshotPath = 's:';
        $this->screenshotUrl = 'http://screenshots.vivid';
    }

    protected function runTest()
    {
        parent::runTest();
        if (Zend_Registry::get('config')->server->autoStopTest) {
            try {
                $this->stop();
            } catch (RuntimeException $e) { }
        }
    }<commit_msg>autom. stoppen<commit_after><?php
class Vps_Test_SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
{
    protected $autoStop = false;
    protected $_unitTestCookie;
    protected $_domain = null;

    public static function suite($className)
    {
        self::$browsers = array();
        foreach (Vps_Registry::get('config')->server->testBrowser as $b) {
            if (!$b->browser) continue; //deaktiviert
            $b = $b->toArray();
            $b['port'] = (int)$b['port'];
            $b['timeout'] = (int)$b['timeout'];
            self::$browsers[] = $b;
        }
        if (!self::$browsers) {
            throw new Vps_Exception("No test-Browser avaliable");
        }
        return parent::suite($className);
    }

    protected function setUp()
    {
        if (!$cfg = Vps_Registry::get('testServerConfig')) {
            throw new Vps_Exception("testServerConfig not set");
        }
        $d = $this->_domain;
        if (!$d) {
            $domain = $cfg->server->domain;
        } else {
            if (!isset($cfg->vpc->domains->$d)) {
                throw new Vps_Exception("Domain '$d' not found in config");
            }
            $domain = $cfg->vpc->domains->$d->domain;
        }
        $this->setBrowserUrl('http://'.$domain.'/');

        $this->_unitTestCookie = md5(uniqid('testId', true));


        $this->captureScreenshotOnFailure = true;
        $this->screenshotPath = 's:';
        $this->screenshotUrl = 'http://screenshots.vivid';
    }

    protected function runTest()
    {
        parent::runTest();
        try {
            $this->stop();
        } catch (RuntimeException $e) { }
    }
{'fraction_non_alphanumeric': 0.162217659137577, 'fraction_numerical': 0.0005866823115283074, 'mean_word_length': 2.080397470641373, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4012988', 'n_tokens_mistral': 1020, 'n_tokens_neox': 1009, 'n_words': 189}