]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - tests/Url/UnparseUrlTest.php
namespacing: \Shaarli\Http\Url
[github/shaarli/Shaarli.git] / tests / Url / UnparseUrlTest.php
1 <?php
2 /**
3 * Unpares Url's tests
4 */
5
6 require_once 'application/Url.php';
7
8 /**
9 * Unitary tests for unparse_url()
10 */
11 class UnparseUrlTest extends PHPUnit_Framework_TestCase
12 {
13 /**
14 * Thanks for building nothing
15 */
16 public function testUnparseEmptyArray()
17 {
18 $this->assertEquals('', unparse_url(array()));
19 }
20
21 /**
22 * Rebuild a full-featured URL
23 */
24 public function testUnparseFull()
25 {
26 $ref = 'http://username:password@hostname:9090/path'
27 .'?arg1=value1&arg2=value2#anchor';
28 $this->assertEquals($ref, unparse_url(parse_url($ref)));
29 }
30 }