refactor(fetcher): split 611-line fetcher into 3 focused files
Extract source-resolution and RSS-specific logic from the monolithic Peptide_News_Fetcher: - class-peptide-news-source-resolver.php (229 lines) — aggregator source detection, redirect resolution, title parsing, backfill - class-peptide-news-rss-source.php (118 lines) — RSS/Atom feed fetching and SimplePie item processing - class-peptide-news-fetcher.php (271 lines) — orchestrator with NewsAPI, storage, pruning, caching, and AI post-processing Also consolidated duplicate clear_article_cache/invalidate_rest_api_cache methods (they were identical) into a single clear_article_cache(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,9 @@ namespace PeptideNews\Tests\Unit;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
// Load the class under test.
|
||||
// Load the class under test and its dependencies.
|
||||
require_once PEPTIDE_NEWS_PLUGIN_DIR . 'includes/class-peptide-news-source-resolver.php';
|
||||
require_once PEPTIDE_NEWS_PLUGIN_DIR . 'includes/class-peptide-news-rss-source.php';
|
||||
require_once PEPTIDE_NEWS_PLUGIN_DIR . 'includes/class-peptide-news-fetcher.php';
|
||||
|
||||
class FetcherTest extends TestCase {
|
||||
|
||||
Reference in New Issue
Block a user