Skip to content
Permalink
Browse files

Add comments

  • Loading branch information...
Joep Roebroek
Joep Roebroek committed Apr 8, 2018
1 parent 8a1f369 commit 1d420e688ae8c05c530a715b71c5eb7c236428dd
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/TestCase/Routing/Route/RouteTest.php
@@ -564,12 +564,14 @@ public function testMatchWithHostKeys()
['controller' => 'posts', 'action' => 'index', '_host' => 'example.com'],
$context
);
// Http has port 80 as default, do not include it in the url
$this->assertEquals('http://example.com/posts/index', $result);
$result = $route->match(
['controller' => 'posts', 'action' => 'index', '_scheme' => 'webcal'],
$context
);
// Webcal is not on port 80 by default, include it in url
$this->assertEquals('webcal://foo.com:80/posts/index', $result);
$result = $route->match(
@@ -614,6 +616,7 @@ public function testMatchWithHostKeys()
],
$context
);
// Https scheme is not on port 8080 by default, include the port
$this->assertEquals('https://example.com:8080/dir/posts/index', $result);
}
@@ -690,6 +693,7 @@ public function testMatchWithHostWildcardOption()
'_host' => 'foo.example.com',
'_port' => 8080
]);
// When the port and scheme in the context are not present in the original url, they should be added
$this->assertSame('https://foo.example.com:8080/fallback', $result);
}

0 comments on commit 1d420e6

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.