Plugin packaging and docs

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-09 22:45:30 +00:00
parent 80f1709a2e
commit 4343f62140
63 changed files with 1369 additions and 223 deletions

View File

@@ -0,0 +1,28 @@
<?php
/**
* Unit test for API key revoke handler
*
* @package Igny8Bridge
*/
class Test_Revoke_Api_Key extends WP_UnitTestCase {
public function test_revoke_api_key_clears_options() {
// Simulate stored API key and tokens
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());
// Call revoke
Igny8Admin::revoke_api_key();
// Assert 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'));
}
}