From c4d5be53c2ae503c00da3cfe6b28d0ce9d2ca7f5 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 17 May 2020 14:16:32 +0200 Subject: Process Daily RSS feed through Slim controller The daily RSS template has been entirely rewritten to handle the whole feed through the template engine. --- tests/http/HttpUtils/IndexUrlTest.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'tests/http/HttpUtils/IndexUrlTest.php') 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 ) ); } + + /** + * The route is stored in REQUEST_URI + */ + public function testPageUrlWithRoute() + { + $this->assertEquals( + 'http://host.tld/picture-wall', + page_url( + array( + 'HTTPS' => 'Off', + 'SERVER_NAME' => 'host.tld', + 'SERVER_PORT' => '80', + 'SCRIPT_NAME' => '/index.php', + 'REQUEST_URI' => '/picture-wall', + ) + ) + ); + + $this->assertEquals( + 'http://host.tld/admin/picture-wall', + page_url( + array( + 'HTTPS' => 'Off', + 'SERVER_NAME' => 'host.tld', + 'SERVER_PORT' => '80', + 'SCRIPT_NAME' => '/admin/index.php', + 'REQUEST_URI' => '/admin/picture-wall', + ) + ) + ); + } } -- cgit v1.2.3