Tests: Make test token 32 characters to match valid length

This commit is contained in:
Ian Dunn 2022-09-13 11:42:24 -07:00
parent ec8c052204
commit 04413b9f6c
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB

View file

@ -114,7 +114,12 @@ class Test_Auth extends WP_UnitTestCase {
'non-existent-token' => array( false ), // Simulates `get_post_meta()` return value. 'non-existent-token' => array( false ), // Simulates `get_post_meta()` return value.
'wrong-data-type' => array( 'this string is not an array' ), 'wrong-data-type' => array( 'this string is not an array' ),
'wrong-array-items' => array( 'this' => "doesn't have `value` and `expiration` items" ), 'wrong-array-items' => array( 'this' => "doesn't have `value` and `expiration` items" ),
'invalid-value' => array( 'Valid tokens will never contain special characters like !@#$%^&*()' ),
'invalid-value' => array(
// Must have TOKEN_LENGTH characters, otherwise could be rejected for the wrong reason.
'value' => 'Has special characters !@#$%^&*)',
'expiration' => time() + MINUTE_IN_SECONDS,
),
); );
} }