@@ 393-407 (lines=15) @@ | ||
390 | * @runInSeparateProcess |
|
391 | * @preserveGlobalState disabled |
|
392 | */ |
|
393 | public function test_request_port_constants() { |
|
394 | define( 'JETPACK_SIGNATURE__HTTP_PORT', 81 ); |
|
395 | $this->test_get_request_port( 81, '', '' ); |
|
396 | $this->test_get_request_port( '81', '', '' ); |
|
397 | $this->test_get_request_port( 81, '82', '' ); |
|
398 | $this->test_get_request_port( 82, '81', '82' ); |
|
399 | $this->test_get_request_port( '82', '81', '82' ); |
|
400 | ||
401 | define( 'JETPACK_SIGNATURE__HTTPS_PORT', 444 ); |
|
402 | $this->test_get_request_port( 444, '', '', true ); |
|
403 | $this->test_get_request_port( '444', '', '', true ); |
|
404 | $this->test_get_request_port( 444, '445', '', true ); |
|
405 | $this->test_get_request_port( 445, '444', '445', true ); |
|
406 | $this->test_get_request_port( '445', '444', '445', true ); |
|
407 | } |
|
408 | ||
409 | /** |
|
410 | * Runs isolated tests to check the behavior of constants when declared as strings |
|
@@ 417-431 (lines=15) @@ | ||
414 | * @runInSeparateProcess |
|
415 | * @preserveGlobalState disabled |
|
416 | */ |
|
417 | public function test_request_port_constants_as_strings() { |
|
418 | define( 'JETPACK_SIGNATURE__HTTP_PORT', '81' ); |
|
419 | $this->test_get_request_port( 81, '', '' ); |
|
420 | $this->test_get_request_port( '81', '', '' ); |
|
421 | $this->test_get_request_port( 81, '82', '' ); |
|
422 | $this->test_get_request_port( 82, '81', '82' ); |
|
423 | $this->test_get_request_port( '82', '81', '82' ); |
|
424 | ||
425 | define( 'JETPACK_SIGNATURE__HTTPS_PORT', '444' ); |
|
426 | $this->test_get_request_port( 444, '', '', true ); |
|
427 | $this->test_get_request_port( '444', '', '', true ); |
|
428 | $this->test_get_request_port( 444, '445', '', true ); |
|
429 | $this->test_get_request_port( 445, '444', '445', true ); |
|
430 | $this->test_get_request_port( '445', '444', '445', true ); |
|
431 | } |
|
432 | ||
433 | /** |
|
434 | * Runs isolated tests to check the behavior of constants with invalid values |