wp plugin udapted v1.5.0

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-13 08:19:55 +00:00
parent 17b3811d4c
commit 3cc2e6b270
13 changed files with 1078 additions and 273 deletions

View File

@@ -8,20 +8,18 @@
class Test_Revoke_Api_Key extends WP_UnitTestCase {
public function test_revoke_api_key_clears_options() {
// Simulate stored API key and tokens
// Simulate stored connection data (simplified structure)
update_option('igny8_api_key', 'test-key-123');
update_option('igny8_access_token', 'test-key-123');
update_option('igny8_refresh_token', 'refresh-123');
update_option('igny8_token_refreshed_at', time());
update_option('igny8_site_id', '12345');
update_option('igny8_last_communication', time());
// Call revoke
Igny8Admin::revoke_api_key();
// Assert removed
// Assert core connection options removed
$this->assertFalse(get_option('igny8_api_key'));
$this->assertFalse(get_option('igny8_access_token'));
$this->assertFalse(get_option('igny8_refresh_token'));
$this->assertFalse(get_option('igny8_token_refreshed_at'));
$this->assertFalse(get_option('igny8_site_id'));
$this->assertFalse(get_option('igny8_last_communication'));
}
}