getProperty( 'instance' ); $prop->setAccessible( true ); $prop->setValue( null, null ); $this->adapter = new WPDO_HivePress_Social_Links_Adapter(); } public function test_implements_adapter_interface(): void { $this->assertInstanceOf( WPDO_HivePress_Adapter::class, $this->adapter ); } public function test_identity(): void { $this->assertSame( 'hivepress-social-links', $this->adapter->plugin_slug() ); $this->assertSame( 'HivePress\\SocialLinks\\Plugin', $this->adapter->detection_class() ); } public function test_on_register_fields_registers_seven_cold_fields(): void { $registry = WPDO_Schema_Registry::instance(); $this->adapter->on_register_fields( $registry ); // All seven social URL fields should land in cold zone on hp_vendor. $facebook = $registry->get_field( 'hp_vendor', 'hp_facebook_url' ); $this->assertSame( 'cold', $facebook['zone'] ); $instagram = $registry->get_field( 'hp_vendor', 'hp_instagram_url' ); $this->assertSame( 'cold', $instagram['zone'] ); $whatsapp = $registry->get_field( 'hp_vendor', 'hp_whatsapp_url' ); $this->assertSame( 'cold', $whatsapp['zone'] ); } public function test_doctor_check_reports_field_count(): void { $result = $this->adapter->doctor_check(); $this->assertTrue( $result['ok'] ); $this->assertStringContainsString( '7 cold fields', $result['message'] ); } public function test_score_aggregates_to_perfect_ten(): void { $this->assertSame( 10.0, $this->adapter->suitability_score()['aggregate'] ); } }