- 3-step OpenRouter pipeline: Gatekeeper scoring/classification, PubMed+Google URL extraction, Markdown summary generation - REST worker routes /wp-json/peptide-news/v1/worker/* with X-Peptide-News-Token auth - Standalone Coolify worker (tools/vps-worker) with Dockerfile + docker-compose - CLI commands, content extractor, pubmed extractor, google url resolver - 89 PHPUnit tests passing
25 lines
642 B
PHP
25 lines
642 B
PHP
<?php
|
|
/**
|
|
* Unit tests for Peptide_News_CLI commands.
|
|
*
|
|
* @since 2.6.0
|
|
*/
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class CliCommandsTest extends TestCase {
|
|
|
|
public function test_cli_class_exists_and_extends_command(): void {
|
|
$this->assertTrue( class_exists( 'Peptide_News_CLI' ) );
|
|
$cli = new Peptide_News_CLI();
|
|
$this->assertInstanceOf( 'WP_CLI_Command', $cli );
|
|
}
|
|
|
|
public function test_cli_methods_exist(): void {
|
|
$cli = new Peptide_News_CLI();
|
|
$this->assertTrue( method_exists( $cli, 'fetch' ) );
|
|
$this->assertTrue( method_exists( $cli, 'process_llm' ) );
|
|
$this->assertTrue( method_exists( $cli, 'backfill_sources' ) );
|
|
}
|
|
}
|