<?php
// custom-bridges/TestBridge.php
// Simple test bridge to verify RSS Bridge is working

class TestBridge extends BridgeAbstract {
    const NAME = 'Test Bridge';
    const URI = 'https://example.com/';
    const DESCRIPTION = 'Simple test bridge';
    const MAINTAINER = 'Test';
    const CACHE_TIMEOUT = 300;
    
    public function collectData() {
        // Create a simple test item
        $item = [];
        $item['title'] = 'Test Article - ' . date('Y-m-d H:i:s');
        $item['uri'] = 'https://example.com/test';
        $item['content'] = 'This is a test article to verify RSS Bridge is working correctly.';
        $item['timestamp'] = time();
        $item['author'] = 'Test Author';
        $item['categories'] = ['test'];
        
        $this->items[] = $item;
        
        // Add another test item
        $item2 = [];
        $item2['title'] = 'Second Test Article - ' . date('Y-m-d H:i:s');
        $item2['uri'] = 'https://example.com/test2';
        $item2['content'] = 'This is the second test article.';
        $item2['timestamp'] = time() - 3600; // 1 hour ago
        $item2['author'] = 'Test Author';
        $item2['categories'] = ['test'];
        
        $this->items[] = $item2;
    }
    
    public function getName() {
        return 'Test Bridge';
    }
}
?>