Skip to content

Commit 7d007d1

Browse files
committed
test: removes getConfiguredPromptBuilder tests
1 parent 4e86daa commit 7d007d1

File tree

1 file changed

+3
-32
lines changed

1 file changed

+3
-32
lines changed

tests/unit/AiClientTest.php

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -644,35 +644,6 @@ public function testValidateModelOrConfigParameterHelper(): void
644644
}
645645
}
646646

647-
/**
648-
* Tests configurePromptBuilder helper method via reflection.
649-
*/
650-
public function testConfigurePromptBuilderHelper(): void
651-
{
652-
$reflection = new \ReflectionClass(AiClient::class);
653-
$method = $reflection->getMethod('configurePromptBuilder');
654-
$method->setAccessible(true);
655-
656-
$prompt = 'Test prompt';
657-
658-
// Test with null model (default discovery)
659-
$builder = $method->invoke(null, $prompt, null);
660-
$this->assertInstanceOf(\WordPress\AiClient\Builders\PromptBuilder::class, $builder);
661-
662-
// Test with ModelConfig
663-
$config = new ModelConfig();
664-
$config->setTemperature(0.8);
665-
666-
$builderWithConfig = $method->invoke(null, $prompt, $config);
667-
$this->assertInstanceOf(\WordPress\AiClient\Builders\PromptBuilder::class, $builderWithConfig);
668-
669-
// Test with ModelInterface
670-
$model = $this->createMockTextGenerationModel($this->createTestResult());
671-
672-
$builderWithModel = $method->invoke(null, $prompt, $model);
673-
$this->assertInstanceOf(\WordPress\AiClient\Builders\PromptBuilder::class, $builderWithModel);
674-
}
675-
676647
/**
677648
* Tests that validation helper is properly integrated in public methods.
678649
*/
@@ -691,13 +662,13 @@ public function testValidationHelperIntegration(): void
691662
}
692663

693664
/**
694-
* Tests that configurePromptBuilder helper is properly integrated.
665+
* Tests that getConfiguredPromptBuilder helper is properly integrated.
695666
*/
696-
public function testConfigurePromptBuilderHelperIntegration(): void
667+
public function testGetConfiguredPromptBuilderHelperIntegration(): void
697668
{
698669
$prompt = 'Integration test prompt';
699670

700-
// Test that configurePromptBuilder is called with null
671+
// Test that getConfiguredPromptBuilder is called with null
701672
$this->expectException(\InvalidArgumentException::class);
702673
$this->expectExceptionMessageMatches('/No models found that support/');
703674
AiClient::generateResult($prompt, null, $this->createMockEmptyRegistry());

0 commit comments

Comments
 (0)