aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/http/UrlUtils/UnparseUrlTest.php
diff options
context:
space:
mode:
authorAurélien Tamisier <virtualtam+github@flibidi.net>2019-01-18 21:26:03 +0100
committerGitHub <noreply@github.com>2019-01-18 21:26:03 +0100
commitff3b5dc5542ec150f0d9b447394364a15e9156d0 (patch)
tree5e926e36816d510e3b3a10e20b94c23f43b55092 /tests/http/UrlUtils/UnparseUrlTest.php
parent1826e383ecf501302974132fd443cf1ca06e10f6 (diff)
parentdea72c711ff740b3b829d238fcf85648465143a0 (diff)
downloadShaarli-ff3b5dc5542ec150f0d9b447394364a15e9156d0.tar.gz
Shaarli-ff3b5dc5542ec150f0d9b447394364a15e9156d0.tar.zst
Shaarli-ff3b5dc5542ec150f0d9b447394364a15e9156d0.zip
Merge pull request #1248 from virtualtam/refactor/namespacing
Ensure all PHP classes are properly namespaced
Diffstat (limited to 'tests/http/UrlUtils/UnparseUrlTest.php')
-rw-r--r--tests/http/UrlUtils/UnparseUrlTest.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/http/UrlUtils/UnparseUrlTest.php b/tests/http/UrlUtils/UnparseUrlTest.php
new file mode 100644
index 00000000..040d8c54
--- /dev/null
+++ b/tests/http/UrlUtils/UnparseUrlTest.php
@@ -0,0 +1,32 @@
1<?php
2/**
3 * Unpares UrlUtils's tests
4 */
5
6namespace Shaarli\Http;
7
8require_once 'application/http/UrlUtils.php';
9
10/**
11 * Unitary tests for unparse_url()
12 */
13class UnparseUrlTest extends \PHPUnit\Framework\TestCase
14{
15 /**
16 * Thanks for building nothing
17 */
18 public function testUnparseEmptyArray()
19 {
20 $this->assertEquals('', unparse_url(array()));
21 }
22
23 /**
24 * Rebuild a full-featured URL
25 */
26 public function testUnparseFull()
27 {
28 $ref = 'http://username:password@hostname:9090/path'
29 .'?arg1=value1&arg2=value2#anchor';
30 $this->assertEquals($ref, unparse_url(parse_url($ref)));
31 }
32}