<commit_before><?php

class Hm_Test_Dispatch extends PHPUnit_Framework_TestCase {

    public function setUp() {
        require 'bootstrap.php';
        define('CONFIG_FILE', APP_PATH.'hm3.rc');
        $this->config = new Hm_Mock_Config();
    }
    /**
     * @preserveGlobalState disabled
     * @runInSeparateProcess
     */
    public function test_is_php_setup() {
        $this->assertTrue(Hm_Dispatch::is_php_setup());
        Hm_Functions::$exists = false;
        $this->assertFalse(Hm_Dispatch::is_php_setup());
    }
    /**
     * @preserveGlobalState disabled
     * @runInSeparateProcess
     */
    public function test_process_request() {
        ob_start();
        ob_start();
        $router = new Hm_Dispatch($this->config);
        $this->assertEquals('home', $router->page);
        ob_end_clean();
    }
    /**
     * @preserveGlobalState disabled<commit_msg>another tweak to get tests to run on PHP < 5.6<commit_after><?php

class Hm_Test_Dispatch extends PHPUnit_Framework_TestCase {

    public function setUp() {
        require 'bootstrap.php';
        define('CONFIG_FILE', APP_PATH.'hm3.rc');
        $this->config = new Hm_Mock_Config();
    }
    /**
     * @preserveGlobalState disabled
     * @runInSeparateProcess
     */
    public function test_is_php_setup() {
        if ((float) substr(phpversion(), 0, 3) >= 5.6) {
            $this->assertTrue(Hm_Dispatch::is_php_setup());
        }
        Hm_Functions::$exists = false;
        $this->assertFalse(Hm_Dispatch::is_php_setup());
    }
    /**
     * @preserveGlobalState disabled
     * @runInSeparateProcess
     */
    public function test_process_request() {
        ob_start();
        ob_start();
        $router = new Hm_Dispatch($this->config);
        $this->assertEquals('home', $router->page);
        ob_end_clean();
    }
    /**
     * @preserveGlobalState disabled
{'fraction_non_alphanumeric': 0.1328708644610459, 'fraction_numerical': 0.004268943436499467, 'mean_word_length': 2.662109375, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 16, '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': '7629437', 'n_tokens_mistral': 579, 'n_tokens_neox': 564, 'n_words': 96}