diff --git a/src/agent/tests/AgentTest.php b/src/agent/tests/AgentTest.php index 2358e9379..ba1014f75 100644 --- a/src/agent/tests/AgentTest.php +++ b/src/agent/tests/AgentTest.php @@ -104,7 +104,7 @@ public function testConstructorThrowsExceptionForInvalidInputProcessor() $invalidProcessor = new \stdClass(); $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Processor "stdClass" must implement "Symfony\AI\Agent\InputProcessorInterface".'); + $this->expectExceptionMessage('Processor "stdClass" must implement "'.InputProcessorInterface::class.'".'); /* @phpstan-ignore-next-line */ new Agent($platform, $model, [$invalidProcessor]); @@ -117,7 +117,7 @@ public function testConstructorThrowsExceptionForInvalidOutputProcessor() $invalidProcessor = new \stdClass(); $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Processor "stdClass" must implement "Symfony\AI\Agent\OutputProcessorInterface".'); + $this->expectExceptionMessage('Processor "stdClass" must implement "'.OutputProcessorInterface::class.'".'); /* @phpstan-ignore-next-line */ new Agent($platform, $model, [], [$invalidProcessor]); diff --git a/src/agent/tests/InputProcessor/ModelOverrideInputProcessorTest.php b/src/agent/tests/InputProcessor/ModelOverrideInputProcessorTest.php index 6696d43ad..a30768cc2 100644 --- a/src/agent/tests/InputProcessor/ModelOverrideInputProcessorTest.php +++ b/src/agent/tests/InputProcessor/ModelOverrideInputProcessorTest.php @@ -22,6 +22,7 @@ use Symfony\AI\Platform\Bridge\OpenAi\Embeddings; use Symfony\AI\Platform\Bridge\OpenAi\Gpt; use Symfony\AI\Platform\Message\MessageBag; +use Symfony\AI\Platform\Model; #[CoversClass(ModelOverrideInputProcessor::class)] #[UsesClass(Gpt::class)] @@ -58,7 +59,7 @@ public function testProcessInputWithoutModelOption() public function testProcessInputWithInvalidModelOption() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Option "model" must be an instance of "Symfony\AI\Platform\Model".'); + $this->expectExceptionMessage('Option "model" must be an instance of "'.Model::class.'".'); $gpt = new Gpt(); $model = new MessageBag(); diff --git a/src/agent/tests/Toolbox/ToolboxTest.php b/src/agent/tests/Toolbox/ToolboxTest.php index 67e0b2ba7..62f4cfeea 100644 --- a/src/agent/tests/Toolbox/ToolboxTest.php +++ b/src/agent/tests/Toolbox/ToolboxTest.php @@ -162,7 +162,7 @@ public function testExecuteWithUnknownTool() public function testExecuteWithMisconfiguredTool() { $this->expectException(ToolConfigurationException::class); - $this->expectExceptionMessage('Method "foo" not found in tool "Symfony\AI\Fixtures\Tool\ToolMisconfigured".'); + $this->expectExceptionMessage('Method "foo" not found in tool "'.ToolMisconfigured::class.'".'); $toolbox = new Toolbox([new ToolMisconfigured()], new ReflectionToolFactory());