aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/http
diff options
context:
space:
mode:
Diffstat (limited to 'tests/http')
-rw-r--r--tests/http/HttpUtils/IndexUrlTest.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/http/HttpUtils/IndexUrlTest.php b/tests/http/HttpUtils/IndexUrlTest.php
index bcbe59cb..73d33cd4 100644
--- a/tests/http/HttpUtils/IndexUrlTest.php
+++ b/tests/http/HttpUtils/IndexUrlTest.php
@@ -71,4 +71,36 @@ class IndexUrlTest extends \PHPUnit\Framework\TestCase
71 ) 71 )
72 ); 72 );
73 } 73 }
74
75 /**
76 * The route is stored in REQUEST_URI
77 */
78 public function testPageUrlWithRoute()
79 {
80 $this->assertEquals(
81 'http://host.tld/picture-wall',
82 page_url(
83 array(
84 'HTTPS' => 'Off',
85 'SERVER_NAME' => 'host.tld',
86 'SERVER_PORT' => '80',
87 'SCRIPT_NAME' => '/index.php',
88 'REQUEST_URI' => '/picture-wall',
89 )
90 )
91 );
92
93 $this->assertEquals(
94 'http://host.tld/admin/picture-wall',
95 page_url(
96 array(
97 'HTTPS' => 'Off',
98 'SERVER_NAME' => 'host.tld',
99 'SERVER_PORT' => '80',
100 'SCRIPT_NAME' => '/admin/index.php',
101 'REQUEST_URI' => '/admin/picture-wall',
102 )
103 )
104 );
105 }
74} 106}