Skip to content
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 phpunit-watcher for more convenient testing #172

Closed
wants to merge 1 commit into from

Conversation

iandunn
Copy link

@iandunn iandunn commented Oct 6, 2023

This is an alternative approach for a test watcher to the Grunt approach in 6382.6.patch. phpunit-watcher is used in Gutenberg, wordcamp.org, and several other wporg repos.

Pest may be a better alternative long term, but that might require a more substantial migration. There isn't any watcher right now, which makes testing less convenient (and therefore less likely). The ticket has been dormant for a long time, and this only took a few minutes to set up, so it seems like a good short/medium-term solution to me, even if folks eventually want to switch to Pest or something else. IMO it'd also be fine as a long-term solution.

To test, run composer update, then something like composer run test:watch -- --group=groups,cache. It should re-run the selected tests automatically when any PHP files in src or tests change.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/6382

@renatonascalves
Copy link
Member

I like this. I use phpunit-watcher locally, but using a different configuration.

@iandunn Would you be willing to resolve the conflicts and make sure this file is not bundled to wp?

@imath any objection adding this to core plugin? It's mostly developer focused.

@imath
Copy link
Member

imath commented Feb 20, 2024

@renatonascalves sure no problem. Sorry @iandunn it got out of my radar 😞

@renatonascalves
Copy link
Member

Closing it in favor of #233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants