+ // Don't add HTTPS port to foreign URLs
+ $retval[] = [
+ 'https://foreign.example.com/foo',
+ 'https://foreign.example.com/foo',
+ PROTO_HTTPS,
+ '//wiki.example.com',
+ 'http://wiki.example.com',
+ 'https',
+ 111,
+ "Don't add HTTPS port to foreign URLs"
+ ];
+ $retval[] = [
+ 'https://foreign.example.com:222/foo',
+ 'https://foreign.example.com:222/foo',
+ PROTO_HTTPS,
+ '//wiki.example.com',
+ 'http://wiki.example.com',
+ 'https',
+ 111,
+ "Don't overwrite HTTPS port of foreign URLs"
+ ];
+ // Do add HTTPS port to local URLs
+ $retval[] = [
+ 'https://wiki.example.com:111/foo',
+ '/foo',
+ PROTO_HTTPS,
+ '//wiki.example.com',
+ 'http://wiki.example.com',
+ 'https',
+ 111,
+ "Do add HTTPS port to protocol-relative URLs"
+ ];
+