Ergo\Tests\Http\UrlTest::testSerializeToString PHP Method

testSerializeToString() public method

    public function testSerializeToString()
    {
        // single element means expect in = out
        $pairs = array(array('/'), array('/path'), array('/path/'), array('/path?', '/path'), array('/path/?', '/path/'), array('/path?query'), array('/path?query#', '/path?query'), array('/path?query#frag'), array('//example.org', '//example.org/'), array('//example.org:80', '//example.org:80/'), array('//example.org:81', '//example.org:81/'), array('//example.org/'), array('//example.org:80/'), array('//example.org:81/'), array('//example.org/path'), array('//example.org/path?query'), array('//example.org/path?query#frag'), array('http://example.org/'), array('https://example.org/'), array('http://example.org:8000/'), array('https://example.org:8000/'), array('http://example.org:443/'), array('https://example.org:80/'), array('http://example.org:80/', 'http://example.org/'), array('https://example.org:443/', 'https://example.org/'), array('http://example.org/path?query#fragment'));
        foreach ($pairs as $pair) {
            $in = $pair[0];
            $expect = isset($pair[1]) ? $pair[1] : $pair[0];
            $url = new Http\Url($in);
            $this->assertEquals("{$url}", $expect, "For input [{$in}] %s");
        }
    }