-
Notifications
You must be signed in to change notification settings - Fork 2
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
Tests for stats listener #99
Conversation
2ed856f
to
da9b395
Compare
52b1da9
to
4842b19
Compare
3b854c5
to
e490c42
Compare
e490c42
to
3a8cb94
Compare
e08c4f8
to
4abc92f
Compare
e86264e
to
208faa4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests work well and pass, great job there! But I am not a fan of the local wp-env
dependency. If I add what I suggested in my comment it can run without wp-env and by just running ./vendor/bin/phpunit
Can we find a way that allows for both?
We're calling glotpress/tests/phpunit/includes/loader.php which already installs glotpress.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvement!
This PR adds tests for the
Stats_Listener
(which "listens" to actions from GlotPress).This took me longer than expected because it turns out that the test setup wasn't yet fully done. I looked at how https://github.com/GlotPress/gp-translation-helpers does it but since that repo doesn't use
wp-env
, it didn't directly apply to here, so I had to figure some things out.TODO
Stats_Listener