Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ Tests the abstract `Two_Factor_Provider` base class:
- `is_supported_for_user` (globally registered vs. not)
- Default implementations of `get_alternative_provider_label`, `pre_process_authentication`, `uninstall_user_meta_keys`, `uninstall_options`

### Provider Settings REST API — `tests/class-two-factor-rest-api.php`

**Class:** `Tests_Two_Factor_REST_API` · **Groups:** `core`, `rest-api`
Tests the authenticated provider settings endpoints:

- Self and administrator permission boundaries
- Provider status and TOTP secret redaction
- Email and recovery-code management
- Configured, enabled, and primary-provider invariants
- Recent revalidation responses and targets
- Session invalidation for self-service and administrator changes

### TOTP Provider — `tests/providers/class-two-factor-totp.php`

**Class:** `Tests_Two_Factor_Totp` · **Groups:** `providers`, `totp`
Expand All @@ -95,6 +107,7 @@ Extends `WP_Test_REST_TestCase`. Tests the TOTP REST endpoints:

- Setting a TOTP key with a valid/invalid/missing auth code
- Updating an existing TOTP key
- Server-owned enrollment creation, confirmation, replacement, expiry, and replay prevention
- Deleting own secret
- Admin deleting another user's secret
- Non-admin cannot delete another user's secret
Expand Down
Loading
Loading