mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-06 10:45:44 +03:00
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.
This commit is contained in:
parent
9c0d1371f3
commit
c9783a17f5
2 changed files with 22 additions and 6 deletions
|
@ -275,23 +275,33 @@ class Test_Contributor extends WP_UnitTestCase {
|
|||
$contributors = array(
|
||||
'active + due for email' => array(
|
||||
'last_logged_in' => strtotime( '1 week ago' ),
|
||||
'user_registered' => strtotime( '1 year ago' ),
|
||||
'5ftf_last_inactivity_email' => 0,
|
||||
),
|
||||
|
||||
'active + not due for email' => array(
|
||||
'last_logged_in' => strtotime( '1 week ago' ),
|
||||
'user_registered' => strtotime( '1 year ago' ),
|
||||
'5ftf_last_inactivity_email' => strtotime( '1 month ago' ),
|
||||
),
|
||||
|
||||
'inactive + due for email' => array(
|
||||
'last_logged_in' => strtotime( '4 months ago' ),
|
||||
'user_registered' => strtotime( '1 year ago' ),
|
||||
'5ftf_last_inactivity_email' => strtotime( '4 months ago' ),
|
||||
),
|
||||
|
||||
'inactive + not due for email' => array(
|
||||
'last_logged_in' => strtotime( '4 months ago' ),
|
||||
'user_registered' => strtotime( '1 year ago' ),
|
||||
'5ftf_last_inactivity_email' => strtotime( '2 months ago' ),
|
||||
),
|
||||
|
||||
'new user' => array(
|
||||
'last_logged_in' => 0,
|
||||
'user_registered' => strtotime( '1 week ago' ),
|
||||
'5ftf_last_inactivity_email' => 0,
|
||||
),
|
||||
);
|
||||
|
||||
$expected = array( 'inactive + due for email' );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue