Skip to content

Commit a5994e7

Browse files
test: add unit test for SERVER_PORT type cast (#438)
1 parent db1ed8b commit a5994e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/OpenIDConnectClientTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ public function testGetRedirectURL()
5858

5959
$_SERVER['SERVER_NAME'] = 'domain.test';
6060
$_SERVER['REQUEST_URI'] = '/path/index.php?foo=bar&baz#fragment';
61+
$_SERVER['SERVER_PORT'] = '443';
6162
self::assertSame('http://domain.test/path/index.php', $client->getRedirectURL());
63+
64+
$_SERVER['SERVER_PORT'] = '8888';
65+
self::assertSame('http://domain.test:8888/path/index.php', $client->getRedirectURL());
6266
}
6367

6468
public function testAuthenticateDoesNotThrowExceptionIfClaimsIsMissingNonce()

0 commit comments

Comments
 (0)