<commit_before><?php
class RequestTest extends PHPUnit_Framework_TestCase
{
    public function testSetup()
    {
        $filename = "test.php";
        $method = "POST";
        $host = "www.test.com";
        $uri = "/test/uri";
        $req = new \SlaxWeb\Router\Request();

        $req->setUpRequest($host, $method, $uri, $filename);

        $this->assertEquals("test/uri", $req->uri);
        $this->assertEquals("POST", $req->method);
        $this->assertEquals("www.test.com", $req->domain);
    }

    public function testScriptNameRemoved()
    {
        $filename = "test.php";
        $method = "POST";
        $host = "www.test.com";
        $uri = "/test.php/test/uri";
        $req = new \SlaxWeb\Router\Request();

        $req->setUpRequest($host, $method, $uri, $filename);

        $this->assertEquals("test/uri", $req->uri);
        $this->assertEquals("POST", $req->method);
        $this->assertEquals("www.test.com", $req->domain);
    }

    public function testPortRetained()
    {
        $filename = "test.php";
        $method = "POST";
        $host = "www.test.com:8080";
        $uri = "/test/uri";
        $req = new \SlaxWeb\Router\Request();

        $req->setUpRequest($host, $method, $uri, $filename);

        $this->assertEquals("test/uri", $req->uri);
        $this->assertEquals("POST", $req->method);
        $this->assertEquals("www.test.com:8080", $req->domain);
    }

    public function  testCliSetup()
    {
        $req = new \SlaxWeb\Router\Request();
        $req->setUpCLI("test/uri");

        $this->assertEquals("test/uri", $req->uri);
        $this->assertEquals("CLI", $req->method);
        $this->assertEquals("Command Line", $req->domain);
    }
}<commit_msg>update unit tests for query string removal<commit_after><?php
class RequestTest extends PHPUnit_Framework_TestCase
{
    public function testSetup()
    {
        $filename = "test.php";
        $method = "POST";
        $host = "www.test.com";
        $uri = "/test/uri";
        $qString = null;
        $req = new \SlaxWeb\Router\Request();

        $req->setUpRequest($host, $method, $uri, $filename, $qString);

        $this->assertEquals("test/uri", $req->uri);
        $this->assertEquals("POST", $req->method);
        $this->assertEquals("www.test.com", $req->domain);
    }

    public function testScriptNameRemoved()
    {
        $filename = "test.php";
        $method = "POST";
        $host = "www.test.com";
        $uri = "/test.php/test/uri";
        $qString = null;
        $req = new \SlaxWeb\Router\Request();

        $req->setUpRequest($host, $method, $uri, $filename, $qString);

        $this->assertEquals("test/uri", $req->uri);
        $this->assertEquals("POST", $req->method);
        $this->assertEquals("www.test.com", $req->domain);
    }

    public function testPortRetained()
    {
        $filename = "test.php";
        $method = "POST";
        $host = "www.test.com:8080";
        $uri = "/test/uri";
        $qString = null;
        $req = new \SlaxWeb\Router\Request();

        $req->setUpRequest($host, $method, $uri, $filename, $qString);

        $this->assertEquals("test/uri", $req->uri);
        $this->assertEquals("POST", $req->method);
        $this->assertEquals("www.test.com:8080", $req->domain);
    }

    public function  testCliSetup()
    {
        $req = new \SlaxWeb\Router\Request();
        $req->setUpCLI("test/uri");

        $this->assertEquals("test/uri", $req->uri);
        $this->assertEquals("CLI", $req->method);
        $this->assertEquals("Command Line", $req->domain);
    }

    public function testQueryString()
    {
        $filename = "test.php";
        $method = "POST";
        $host = "www.test.com";
        $uri = "/test/uri?test=test";
        $qString = "test=test";
        $req = new \SlaxWeb\Router\Request();

        $req->setUpRequest($host, $method, $uri, $filename, $qString);

        $this->assertEquals("test/uri", $req->uri);
        $this->assertEquals("POST", $req->method);
        $this->assertEquals("www.test.com", $req->domain);
    }
}
{'fraction_non_alphanumeric': 0.19321533923303835, 'fraction_numerical': 0.003933136676499509, 'mean_word_length': 2.422203532380151, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 66, 'https://': 0, 'lorem ipsum': 0, 'www.': 14, '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': '6234359', 'n_tokens_mistral': 1306, 'n_tokens_neox': 1269, 'n_words': 224}