wp-cli / scaffold-command

Generates code for post types, taxonomies, blocks, plugins, child themes, etc.
MIT License
165 stars 87 forks source link

Refresh `install-wp-tests.sh` script #322

Open swissspidy opened 1 year ago

swissspidy commented 1 year ago

Feature Request

Describe your use case and the problem you are facing

This script hasn't really seen any major updates, because they haven't been necessary, but I think there's still some room for improvements.

Describe the solution you'd like

Some thoughts and ideas:

swissspidy commented 1 year ago

Another thing that's annoying:

On macOS the files in the tmo wordpress and wordpress-tests-lib can get wiped sometimes, but the folders are still there. But because the script only checks if the folders exist and not the files, it won't recreate the setup.

To make that more robust, we can check if files like "$WP_TESTS_DIR"/includes/functions.php and "$WP_CORE_DIR"/wp-includs.php exist.

See https://github.com/swissspidy/performant-translations/commit/108e44363609cf81331ca20d330e1e3b46f2e391