refactor(2meet-data-optimizer-hivepress-addon): stop registering Hot zone fields
- ADR-003 step 4 (AddOn side): core, requests, bookings, memberships and marketplace adapters no longer register zone=hot fields or contribute hot_* FSM modules; their keys live in TMDO_HivePress_Entity_Groups. Cold/warm registrations are unchanged. - Hot-table doctor probes go with them (trait defaults apply). The hot-clause query rewrite and cron optimizer are now inert and are left for the ADR step-5 removal together with core's hot path. - New NoHotZoneRegistrationTest pins the invariant across all 13 adapters; per-adapter hot assertions removed. - Verify: HP unit 142 / integration 49 green, phpcs clean (WordPress) - PR: PR-037
This commit is contained in:
@@ -46,29 +46,10 @@ class HivePressCoreAdapterTest extends TestCase {
|
||||
$this->assertSame( '1.7.0', $this->adapter->minimum_addon_version() );
|
||||
}
|
||||
|
||||
public function test_migrations_returns_listing_and_vendor_modules(): void {
|
||||
$mods = $this->adapter->migrations();
|
||||
$this->assertContains( 'hot_hp_listing', $mods );
|
||||
$this->assertContains( 'hot_hp_vendor', $mods );
|
||||
}
|
||||
|
||||
public function test_on_register_fields_populates_schema_registry(): void {
|
||||
$registry = WPDO_Schema_Registry::instance();
|
||||
$this->adapter->on_register_fields( $registry );
|
||||
|
||||
// Listing hot fields.
|
||||
$drafted = $registry->get_field( 'hp_listing', 'hp_drafted' );
|
||||
$this->assertIsArray( $drafted );
|
||||
$this->assertSame( 'hot', $drafted['zone'] );
|
||||
$this->assertTrue( (bool) $drafted['indexed'] );
|
||||
|
||||
$expired = $registry->get_field( 'hp_listing', 'hp_expired_time' );
|
||||
$this->assertSame( 'hot', $expired['zone'] );
|
||||
$this->assertStringContainsString( 'bigint', $expired['data_type'] );
|
||||
|
||||
$featured_time = $registry->get_field( 'hp_listing', 'hp_featured_time' );
|
||||
$this->assertSame( 'hot', $featured_time['zone'] );
|
||||
|
||||
// Vendor cold blob.
|
||||
$vendor_image = $registry->get_field( 'hp_vendor', 'hp_image' );
|
||||
$this->assertIsArray( $vendor_image );
|
||||
@@ -87,16 +68,6 @@ class HivePressCoreAdapterTest extends TestCase {
|
||||
}
|
||||
}
|
||||
|
||||
public function test_doctor_check_reports_table_status(): void {
|
||||
$result = $this->adapter->doctor_check();
|
||||
$this->assertIsArray( $result );
|
||||
$this->assertArrayHasKey( 'ok', $result );
|
||||
$this->assertArrayHasKey( 'message', $result );
|
||||
$this->assertArrayHasKey( 'details', $result );
|
||||
// The stub $wpdb returns null for SHOW TABLES, so tables appear missing → ok=false.
|
||||
$this->assertFalse( $result['ok'] );
|
||||
}
|
||||
|
||||
public function test_optimize_query_extracts_hot_clauses(): void {
|
||||
$registry = WPDO_Schema_Registry::instance();
|
||||
$this->adapter->on_register_fields( $registry );
|
||||
|
||||
Reference in New Issue
Block a user