Fix broken url generator test
This commit is contained in:
parent
54b4e11335
commit
4eb258bb2f
@ -88,7 +88,7 @@ class UrlGenerator extends RoutingBase {
|
|||||||
}
|
}
|
||||||
$path = implode('/', $path_segments);
|
$path = implode('/', $path_segments);
|
||||||
|
|
||||||
$scheme = (isset($_SERVER['HTTPS'])) ? 'https:' : 'http';
|
$scheme = (isset($_SERVER['HTTPS'])) ? 'https:' : 'http:';
|
||||||
|
|
||||||
return "{$scheme}//{$this->host}/{$path}";
|
return "{$scheme}//{$this->host}/{$path}";
|
||||||
}
|
}
|
||||||
|
@ -28,13 +28,13 @@ class UrlGeneratorTest extends AnimeClientTestCase {
|
|||||||
'args' => [
|
'args' => [
|
||||||
'images'
|
'images'
|
||||||
],
|
],
|
||||||
'expected' => '//localhost/assets/images',
|
'expected' => 'http://localhost/assets/images',
|
||||||
],
|
],
|
||||||
'multiple arguments' => [
|
'multiple arguments' => [
|
||||||
'args' => [
|
'args' => [
|
||||||
'images', 'anime', 'foo.png'
|
'images', 'anime', 'foo.png'
|
||||||
],
|
],
|
||||||
'expected' => '//localhost/assets/images/anime/foo.png'
|
'expected' => 'http://localhost/assets/images/anime/foo.png'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user