adapter = new WPDO_HivePress_Reviews_Adapter(); } public function test_implements_adapter_interface(): void { $this->assertInstanceOf( WPDO_HivePress_Adapter::class, $this->adapter ); } public function test_identity(): void { $this->assertSame( 'hivepress-reviews', $this->adapter->plugin_slug() ); $this->assertSame( 'HivePress\\Reviews\\Plugin', $this->adapter->detection_class() ); $this->assertSame( 'HIVEPRESS_REVIEWS_VERSION', $this->adapter->detection_const() ); $this->assertSame( '1.4.0', $this->adapter->minimum_addon_version() ); } public function test_comment_type_constant_exposed(): void { $this->assertSame( 'hp_review', WPDO_HivePress_Reviews_Adapter::COMMENT_TYPE ); } public function test_doctor_check_reports_missing_table_in_stub_env(): void { $result = $this->adapter->doctor_check(); $this->assertIsArray( $result ); $this->assertArrayHasKey( 'ok', $result ); // Stub $wpdb returns null for SHOW TABLES → ok=false. $this->assertFalse( $result['ok'] ); $this->assertStringContainsString( 'wpdo_comment_hp_review', $result['message'] ); } public function test_score_aggregates_to_perfect_ten(): void { $score = $this->adapter->suitability_score(); $this->assertSame( 10.0, $score['aggregate'] ); } public function test_no_fsm_modules_owned(): void { // Comment entity-bridge owns lifecycle; adapter is read-only. $this->assertSame( array(), $this->adapter->migrations() ); } }