-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with site still being created using the WP_TESTS_DOMAIN con…
…stant (#632) * Fix issue with site still being created using the WP_TESTS_DOMAIN constant * Lint fix * Introduce new constant to control https status * Remove debug * Set the constant * Remove debug * Linting fixes * Document WP_TESTS_USE_HTTPS * CHANGELOG * Clarify * Validate the URL * Change message
- Loading branch information
Showing
7 changed files
with
82 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,7 +120,12 @@ public static function reset_server(): void { | |
$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1'; | ||
|
||
unset( $_SERVER['HTTP_REFERER'] ); | ||
unset( $_SERVER['HTTPS'] ); | ||
|
||
if ( defined( 'WP_TESTS_USE_HTTPS' ) && WP_TESTS_USE_HTTPS ) { | ||
$_SERVER['HTTPS'] = 'on'; | ||
} else { | ||
unset( $_SERVER['HTTPS'] ); | ||
} | ||
} | ||
|
||
/** | ||
|
@@ -233,6 +238,7 @@ public static function setup_configuration(): void { | |
$table_prefix = 'wptests_'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited | ||
|
||
defined( 'WP_TESTS_DOMAIN' ) || define( 'WP_TESTS_DOMAIN', 'example.org' ); | ||
defined( 'WP_TESTS_USE_HTTPS' ) || define( 'WP_TESTS_USE_HTTPS', false ); | ||
defined( 'WP_TESTS_EMAIL' ) || define( 'WP_TESTS_EMAIL', '[email protected]' ); | ||
defined( 'WP_TESTS_TITLE' ) || define( 'WP_TESTS_TITLE', 'Test Site' ); | ||
defined( 'WP_PHP_BINARY' ) || define( 'WP_PHP_BINARY', 'php' ); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,10 +52,11 @@ | |
|
||
$table_prefix = 'wptests_'; // Only numbers, letters, and underscores please! | ||
|
||
define( 'WP_TESTS_DOMAIN', 'example.org' ); | ||
define( 'WP_TESTS_EMAIL', '[email protected]' ); | ||
define( 'WP_TESTS_TITLE', 'Test Site' ); | ||
defined( 'WP_TESTS_DOMAIN' ) || define( 'WP_TESTS_DOMAIN', 'example.org' ); | ||
defined( 'WP_TESTS_USE_HTTPS' ) || define( 'WP_TESTS_USE_HTTPS', false ); | ||
defined( 'WP_TESTS_EMAIL' ) || define( 'WP_TESTS_EMAIL', '[email protected]' ); | ||
defined( 'WP_TESTS_TITLE' ) || define( 'WP_TESTS_TITLE', 'Test Site' ); | ||
|
||
define( 'WP_PHP_BINARY', 'php' ); | ||
defined( 'WP_PHP_BINARY' ) || define( 'WP_PHP_BINARY', 'php' ); | ||
|
||
define( 'WPLANG', '' ); | ||
defined( 'WPLANG' ) || define( 'WPLANG', '' ); |