fix(tests): add post_type_exists stub to BaseTestCase

When PR Core is not active, PeptideLinker guards calls with post_type_exists().
This stub was missing from base setup, causing 8 PublisherTest errors.
Adds Functions\when('post_type_exists')->justReturn(false) to setUp().
This commit is contained in:
peptiderepo
2026-04-23 02:39:02 +00:00
parent ad51ab705f
commit 7cd65b145f

View File

@@ -38,6 +38,9 @@ abstract class BaseTestCase extends TestCase {
// home_url is used by OpenRouter provider in request headers.
Functions\when( 'home_url' )->justReturn( 'https://test.example.com' );
// post_type_exists is used by PeptideLinker to check if PR Core is active.
// Stub returns false to simulate when PR Core is not installed.
Functions\when( 'post_type_exists' )->justReturn( false );
// current_time is called by Logger on every log write. Stub returns a
// deterministic timestamp so tests are reproducible.