summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-08-12 13:41:33 +0200
committermsquare <msquare@notrademark.de>2018-08-12 17:36:52 +0200
commitf46e921b710b02d5a1f17f0dd076a5bf085ae735 (patch)
treea74ffe30a07e1e59886262b7d56f65f55e52049c /tests
parent98b03d5c679e91891d6283d04613c2afc29edf59 (diff)
Use domain for links to '/' to fix assets URLs on subdirectories
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/Routing/LegacyUrlGeneratorTest.php4
-rw-r--r--tests/Unit/Routing/UrlGeneratorTest.php1
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/Unit/Routing/LegacyUrlGeneratorTest.php b/tests/Unit/Routing/LegacyUrlGeneratorTest.php
index 55b3d721..3d42afbd 100644
--- a/tests/Unit/Routing/LegacyUrlGeneratorTest.php
+++ b/tests/Unit/Routing/LegacyUrlGeneratorTest.php
@@ -14,9 +14,9 @@ class LegacyUrlGeneratorTest extends TestCase
public function provideLinksTo()
{
return [
- ['/', 'http://foo.bar/index.php', [], 'http://foo.bar/index.php'],
+ ['/', 'http://foo.bar/index.php', [], 'http://foo.bar/'],
['/foo-path', 'http://foo.bar/index.php/index.php', [], 'http://foo.bar/index.php?p=foo_path'],
- ['/foo', 'http://foo.bar/index.php/index.php', [], 'http://foo.bar/index.php?p=foo'],
+ ['/foo', 'http://foo.bar/index.php/index.php', [], 'http://foo.bar/index.php?p=foo'],
['foo', 'http://foo.bar/index.php', ['test' => 'abc'], 'http://foo.bar/index.php?p=foo&test=abc'],
];
}
diff --git a/tests/Unit/Routing/UrlGeneratorTest.php b/tests/Unit/Routing/UrlGeneratorTest.php
index 2d2efd31..e128bfe7 100644
--- a/tests/Unit/Routing/UrlGeneratorTest.php
+++ b/tests/Unit/Routing/UrlGeneratorTest.php
@@ -14,6 +14,7 @@ class UrlGeneratorTest extends TestCase
public function provideLinksTo()
{
return [
+ ['/', '/', 'http://foo.bar/', [], 'http://foo.bar/'],
['/foo/path', '/foo/path', 'http://foo.bar/foo/path', [], 'http://foo.bar/foo/path'],
['foo', '/foo', 'https://foo.bar/foo', [], 'https://foo.bar/foo'],
['foo', '/foo', 'http://f.b/foo', ['test' => 'abc', 'bla' => 'foo'], 'http://f.b/foo?test=abc&bla=foo'],