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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user