<?php
require_once 'config/config.php';

// Simulate UDN publishing test
$article = ['id' => 3, 'title' => 'Test Article', 'content' => 'Test content', 'type' => 'external'];
$platform = ['id' => 20, 'name' => 'UDN 部落格 (UDN Blog)', 'username' => 'jeff@cloudcrm.com.tw', 'password' => 'Jvkc3714!6'];

$publisher = new Publisher();

// Test the UDN case matching
switch (strtolower($platform['name'])) {
    case 'udn 部落格 (udn blog)':
    case 'udn blog':
        echo "UDN Blog case matched successfully\n";
        break;
    default:
        echo "UDN Blog case NOT matched. Platform name: " . $platform['name'] . "\n";
        echo "Lowercase: " . strtolower($platform['name']) . "\n";
        break;
}
?>
