Commit graph

22 commits

Author SHA1 Message Date
Kelly Dwan bb25e0c78b
Tools: Add formatting command, run to fix minor phpcs issues 2024-08-27 13:43:27 -04:00
Ian Dunn ed490dfc26 Apply coding standards 2023-11-06 10:13:10 -08:00
Ian Dunn b86470575f Contributors: Add CSV report of inactive contributors 2023-11-06 10:13:10 -08:00
Ian Dunn 2880d80e12
Contributors: Don't send inactivity emails to banned users.
Fixes #221
2023-02-28 16:36:49 -08:00
Ian Dunn 04413b9f6c
Tests: Make test token 32 characters to match valid length 2022-09-13 11:53:26 -07:00
Ian Dunn ec8c052204
Migrate to latest set_up() methods
See https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/
2022-09-13 11:53:26 -07:00
Ian Dunn 0e88966246
Add code coverage report 2022-09-13 11:53:26 -07:00
Ian Dunn 0964167f12 Apply coding standards 2022-08-29 16:21:06 -07:00
Ian Dunn 32b738d95f Contributors: Add user data for users that don't have expected meta.
Some users don't have any of the expected meta fields. The previous commit caused them to be skipped, resulting in distorted stats.
2022-08-29 16:21:06 -07:00
Ian Dunn 5f1d091185 Stats: Add stats for the % of contributors that are active. 2022-08-29 16:21:06 -07:00
Ian Dunn 0be2f859f9 Tests: Modularize database fixtures for reuse. 2022-08-29 16:21:06 -07:00
Ian Dunn c9783a17f5 Contributors: Move user_registered check to pruning function.
That allows `add_user_data_to_xprofile()` to be reused in other contexts.

`user_login` was removed from the `SELECT` because it wasn't being used.
2022-08-29 16:21:06 -07:00
Ian Dunn ccad917c00 Contributors: Modularize activity detection for reuse. 2022-08-29 16:21:06 -07:00
Ian Dunn 87979f588f
Update to PHPUnit 9 for PHP 8 compatibility 2022-07-19 09:33:34 -07:00
Ian Dunn c6d7bbb7c1
Contributors: Reset profile hours when pledge deactivated.
See https://github.com/WordPress/five-for-the-future/issues/169
2022-05-02 14:22:26 -07:00
Kelly Dwan f32d26ef47
Organize email & authentication code (#101)
* Split Auth functionality out to new file

* Move email-related code into the email file

* Use `assertFalse` for boolean assertions

* Add `can_manage_pledge` to check user or token against a given pledge

Pulled out of e9763f6678

* Remove duplicate test
2019-11-20 10:40:45 -05:00
Kelly Dwan 03949905c0
Tests: Update infrastructure & add travis config (#100)
* Tests: Move tests infrastructure, set up travis

Consolidates the composer files so we can run install once in travis.

* Return empty array if no values are $_POST'ed to the form

Fixes an issue with tests + null values in logs

* Clean up some naming & create helper functions for tests

* Debug travis

* Remove debug

* Fix notices on form

* Turn on multisite flag
2019-11-15 17:40:53 -05:00
Kelly Dwan 42d44f7dc9
Plugin: Fix all phpcs errors
This includes autofixes, along with some manual fixes; mostly syntax-related. Some `phpcs:ignore` comments were added for overzealous rules that don't apply.
2019-11-14 13:48:17 -05:00
Ian Dunn 414c4809e3 Email: Allow tokens to be reused when necessary. 2019-11-12 08:35:06 -08:00
Ian Dunn 5ffca9420f
Email: Send pledge confirmation with authentication token. (#46)
Email: Send pledge confirmation with authentication token.

Fixes #34.
Fixes #10.
2019-10-25 12:07:09 -07:00
Ian Dunn f888fd85c8
Apply coding standards. 2019-10-24 08:12:55 -07:00
Ian Dunn eec9f5cb61
Tests: Setup PHPUnit and PHPUnit Watcher. 2019-10-23 14:27:26 -07:00