refactor(rest): split 435-line REST API into router + articles handler

Extract article listing endpoint and source-suffix stripping into
Peptide_News_Rest_Articles (195 lines). Main REST API retains route
registration, analytics endpoint wrappers, AJAX delete handler, and
permission/validation helpers (210 lines).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
peptiderepo
2026-04-16 22:40:34 +07:00
parent 6060aa3ce1
commit 59d469ba0f
5 changed files with 272 additions and 280 deletions

View File

@@ -9,7 +9,8 @@ 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-rest-articles.php';
require_once PEPTIDE_NEWS_PLUGIN_DIR . 'includes/class-peptide-news-rest-api.php';
class RestApiTest extends TestCase {