Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Joep Roebroek committed Apr 8, 2018
1 parent 8a1f369 commit 1d420e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/TestCase/Routing/Route/RouteTest.php
Expand Up @@ -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(
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 1d420e6

Please sign in to comment.