Skip to content

Commit

Permalink
test: add unit test for SERVER_PORT type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed Sep 13, 2024
1 parent db1ed8b commit d008b9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/OpenIDConnectClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ public function testGetRedirectURL()

$_SERVER['SERVER_NAME'] = 'domain.test';
$_SERVER['REQUEST_URI'] = '/path/index.php?foo=bar&baz#fragment';
$_SERVER['SERVER_PORT'] = '443';
self::assertSame('http://domain.test/path/index.php', $client->getRedirectURL());

$_SERVER['SERVER_PORT'] = '8888';
self::assertSame('http://domain.test:8888/path/index.php', $client->getRedirectURL());
}

public function testAuthenticateDoesNotThrowExceptionIfClaimsIsMissingNonce()
Expand Down

0 comments on commit d008b9c

Please sign in to comment.