From b3990232913a32072c0f7997a05e386a3bbb2d46 Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Tue, 21 Apr 2026 17:01:54 +0000 Subject: [PATCH] cf-removal: move PRAUTOBLOGGER_DEFAULT_IMAGE_MODEL define to test bootstrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On v0.9.0 this constant was implicitly defined by CloudflareImageProviderTest::setUp() — deleted in this PR. OpenRouterImagePricingTest relied on PHPUnit's alphabetical file order (C before O) to have the constant defined before its assertion. Deleting the CF test broke that chain; OR pricing test errored with 'Undefined constant "PRAutoBlogger\\Tests\\Providers\\PRAUTOBLOGGER_DEFAULT_IMAGE_MODEL"'. Fix: hoist the define into tests/bootstrap.php alongside the other PRAUTOBLOGGER_DEFAULT_* constants. No test ordering dependency remains. --- tests/bootstrap.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 6ff6748..6d716a8 100755 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -55,6 +55,15 @@ if ( ! defined( 'PRAUTOBLOGGER_DEFAULT_EDITOR_MODEL' ) ) { define( 'PRAUTOBLOGGER_DEFAULT_EDITOR_MODEL', 'google/gemini-2.5-flash-lite' ); } +// Default image model slug used by OpenRouter/Runware pricing fallbacks and +// settings UI. Source of truth: prautoblogger.php line 63. +// Historically this was defined implicitly by CloudflareImageProviderTest::setUp() +// — that test was deleted in v0.10.0 (cloudflare-workers-ai-removal), so the +// define now lives here where it belongs. +if ( ! defined( 'PRAUTOBLOGGER_DEFAULT_IMAGE_MODEL' ) ) { + define( 'PRAUTOBLOGGER_DEFAULT_IMAGE_MODEL', 'runware:100@1' ); +} + // Default image style suffix used by ImagePromptBuilder and settings UI. if ( ! defined( 'PRAUTOBLOGGER_DEFAULT_IMAGE_STYLE_SUFFIX' ) ) { define( 'PRAUTOBLOGGER_DEFAULT_IMAGE_STYLE_SUFFIX', 'Style: test infomercial style.' );