Skip to content

Integration test bootstrap: add fall-back support for typical WP-CLI setup#16

Merged
jrfnl merged 1 commit intodevelopfrom
feature/12-improve-support-for-scaffold-script
Sep 23, 2021
Merged

Integration test bootstrap: add fall-back support for typical WP-CLI setup#16
jrfnl merged 1 commit intodevelopfrom
feature/12-improve-support-for-scaffold-script

Conversation

@jrfnl
Copy link
Copy Markdown
Collaborator

@jrfnl jrfnl commented Sep 23, 2021

As the WP-CLI scaffold command is an often-used basis for setting up the integration tests, this commit adds a native check to WP Test Utils in the integration tests get_path_to_wp_test_dir() function for the WP native test bootstrap in the typical location used by the WP-CLI scaffold install-wp-tests.sh script.

This means that if the install-wp-tests.sh script is used without adjustments, the path to the WP native test bootstrap should be findable by WP Test Utils without needing to set the WP_TESTS_DIR constant.

Fixes #12

@swissspidy @GaryJones Would be great if either of you had a chance to look this over/test it!

…setup

As the WP-CLI `scaffold` command is an often-used basis for setting up the integration tests, this commit adds a native check to WP Test Utils in the integration tests `get_path_to_wp_test_dir()` function for the WP native test bootstrap in the typical location used by the WP-CLI `scaffold` `install-wp-tests.sh` script.

This means that if the `install-wp-tests.sh` script is used without adjustments, the path to the WP native test bootstrap should be findable by WP Test Utils without needing to set the `WP_TESTS_DIR` constant.

Fixes 12
@jrfnl jrfnl added enhancement New feature or request yoastcs/qa labels Sep 23, 2021
@jrfnl jrfnl added this to the 0.x Next milestone Sep 23, 2021
Copy link
Copy Markdown

@swissspidy swissspidy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well in my testing! 👍

Many thanks!

@jrfnl
Copy link
Copy Markdown
Collaborator Author

jrfnl commented Sep 23, 2021

Thanks for testing this @swissspidy !

@jrfnl jrfnl merged commit ae89de5 into develop Sep 23, 2021
@jrfnl jrfnl deleted the feature/12-improve-support-for-scaffold-script branch September 23, 2021 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request yoastcs/qa

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Look for /tmp/wordpress-tests-lib in get_path_to_wp_test_dir()

2 participants