From 4eb258bb2f44e2a1ae28663b453bc3feb08ee5d0 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Wed, 10 Oct 2018 14:26:44 -0400 Subject: [PATCH] Fix broken url generator test --- src/UrlGenerator.php | 2 +- tests/UrlGeneratorTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/UrlGenerator.php b/src/UrlGenerator.php index c4114ba8..92880de1 100644 --- a/src/UrlGenerator.php +++ b/src/UrlGenerator.php @@ -88,7 +88,7 @@ class UrlGenerator extends RoutingBase { } $path = implode('/', $path_segments); - $scheme = (isset($_SERVER['HTTPS'])) ? 'https:' : 'http'; + $scheme = (isset($_SERVER['HTTPS'])) ? 'https:' : 'http:'; return "{$scheme}//{$this->host}/{$path}"; } diff --git a/tests/UrlGeneratorTest.php b/tests/UrlGeneratorTest.php index a0d51c48..721e1dda 100644 --- a/tests/UrlGeneratorTest.php +++ b/tests/UrlGeneratorTest.php @@ -28,13 +28,13 @@ class UrlGeneratorTest extends AnimeClientTestCase { 'args' => [ 'images' ], - 'expected' => '//localhost/assets/images', + 'expected' => 'http://localhost/assets/images', ], 'multiple arguments' => [ 'args' => [ 'images', 'anime', 'foo.png' ], - 'expected' => '//localhost/assets/images/anime/foo.png' + 'expected' => 'http://localhost/assets/images/anime/foo.png' ] ]; }