aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-x[-rw-r--r--]tests/UrlTest.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/UrlTest.php b/tests/UrlTest.php
index a39630f1..c848e88e 100644..100755
--- a/tests/UrlTest.php
+++ b/tests/UrlTest.php
@@ -151,4 +151,20 @@ class UrlTest extends PHPUnit_Framework_TestCase
151 $url->cleanup() 151 $url->cleanup()
152 ); 152 );
153 } 153 }
154
155 /**
156 * Test default http scheme.
157 */
158 public function testDefaultScheme() {
159 $url = new Url(self::$baseUrl);
160 $this->assertEquals('http', $url->getScheme());
161 $url = new Url('domain.tld');
162 $this->assertEquals('http', $url->getScheme());
163 $url = new Url('ssh://domain.tld');
164 $this->assertEquals('ssh', $url->getScheme());
165 $url = new Url('ftp://domain.tld');
166 $this->assertEquals('ftp', $url->getScheme());
167 $url = new Url('git://domain.tld/push?pull=clone#checkout');
168 $this->assertEquals('git', $url->getScheme());
169 }
154} 170}