hasColumn('modules', 'vendor_mode'); $this->assertTrue($hasColumn, 'modules 테이블에 vendor_mode 컬럼이 있어야 합니다'); } public function test_plugins_table_has_vendor_mode_column(): void { $hasColumn = DB::getSchemaBuilder()->hasColumn('plugins', 'vendor_mode'); $this->assertTrue($hasColumn, 'plugins 테이블에 vendor_mode 컬럼이 있어야 합니다'); } public function test_install_module_method_signature_accepts_vendor_mode(): void { $reflection = new ReflectionClass(ModuleManager::class); $method = $reflection->getMethod('installModule'); $params = $method->getParameters(); $vendorParam = collect($params)->first(fn ($p) => $p->getName() === 'vendorMode'); $this->assertNotNull($vendorParam, 'installModule() 에 vendorMode 파라미터가 있어야 합니다'); $this->assertSame(VendorMode::class, $vendorParam->getType()?->getName()); } public function test_update_module_method_signature_accepts_vendor_mode(): void { $reflection = new ReflectionClass(ModuleManager::class); $method = $reflection->getMethod('updateModule'); $params = $method->getParameters(); $vendorParam = collect($params)->first(fn ($p) => $p->getName() === 'vendorMode'); $this->assertNotNull($vendorParam, 'updateModule() 에 vendorMode 파라미터가 있어야 합니다'); $this->assertSame(VendorMode::class, $vendorParam->getType()?->getName()); } public function test_get_previous_vendor_mode_reads_from_db(): void { $manager = app(ModuleManager::class); $reflection = new ReflectionClass($manager); $method = $reflection->getMethod('getPreviousVendorMode'); $method->setAccessible(true); // 존재하지 않는 모듈 → null $result = $method->invoke($manager, 'nonexistent-test-module-'.uniqid()); $this->assertNull($result); } }