-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Port To WP_TESTS_DOMAIN
#49883
Merged
noahtallen
merged 9 commits into
WordPress:trunk
from
ObliviousHarmony:fix/wp-env-tests-domain
Apr 20, 2023
Merged
Add Port To WP_TESTS_DOMAIN
#49883
noahtallen
merged 9 commits into
WordPress:trunk
from
ObliviousHarmony:fix/wp-env-tests-domain
Apr 20, 2023
Commits on Apr 17, 2023
-
Added Port Addition/Replacement Function
This new function will allow us to add/replace ports in certain `wp-config.php` values.
Configuration menu - View commit details
-
Copy full SHA for f8bfb1a - Browse repository at this point
Copy the full SHA f8bfb1aView commit details
Commits on Apr 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a4dc90f - Browse repository at this point
Copy the full SHA a4dc90fView commit details -
Always Use
WP_SITEURL
When Configuring WordPressSince `WP_SITEURL` already contains the port in both the development and test environments, there is no reason to try and construct the URL with the port. Additionally, it is more accurate to use the test environment's `WP_SITEURL` since that's what WordPress will expect due to the constant.
Configuration menu - View commit details
-
Copy full SHA for 0f6388d - Browse repository at this point
Copy the full SHA 0f6388dView commit details -
Automatically Add Port To
WP_TESTS_DOMAIN
Tests should use the `WP_TESTS_DOMAIN` constant to construct URLs in tests. This poses a problem, however, because the port will be part of the URL in test environments. In my review of WordPress Core and WooCommerce, adding the port to `WP_TESTS_DOMAIN` should not break anything and will make the container more resilient to port customizations.
Configuration menu - View commit details
-
Copy full SHA for b893665 - Browse repository at this point
Copy the full SHA b893665View commit details -
Removed Hardcoded
localhost
From PHPUnit TestsTo add resiliency to the test suite, we should use `WP_TESTS_DOMAIN` instead of hardcoding the domain and port in the URLs.
Configuration menu - View commit details
-
Copy full SHA for 0ddc704 - Browse repository at this point
Copy the full SHA 0ddc704View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf4fee3 - Browse repository at this point
Copy the full SHA bf4fee3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ce58ff - Browse repository at this point
Copy the full SHA 6ce58ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3aa9e17 - Browse repository at this point
Copy the full SHA 3aa9e17View commit details
Commits on Apr 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f3aadee - Browse repository at this point
Copy the full SHA f3aadeeView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.