aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2015-08-20 19:47:01 +0200
committerArthurHoaro <arthur@hoa.ro>2015-08-31 12:26:38 +0200
commit9e1724f1922bf9e38299eecedfce2dcdbd416749 (patch)
tree739a0d15a8225b75c9a0593f1c604774786fcf46 /tests
parentd7efade5d651ec60a05a86baa53f99188ad5d72c (diff)
downloadShaarli-9e1724f1922bf9e38299eecedfce2dcdbd416749.tar.gz
Shaarli-9e1724f1922bf9e38299eecedfce2dcdbd416749.tar.zst
Shaarli-9e1724f1922bf9e38299eecedfce2dcdbd416749.zip
Fixes #325 - Shaarli does not recognize saved links
PHP doesn't seem to autoconvert objects to strings when they're use as array indexes. Fixes regression introduced in d9d776af19fd0a191f82525991dafbb56e1bcfcb
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}