1717
1818use PHPUnit \Framework \TestCase ;
1919use Symfony \AI \Agent \AgentInterface ;
20- use Symfony \AI \AiBundle \Command \ChatCommand ;
20+ use Symfony \AI \AiBundle \Command \AgentCallCommand ;
2121use Symfony \AI \AiBundle \Exception \RuntimeException ;
2222use Symfony \AI \Platform \Message \Message ;
2323use Symfony \AI \Platform \Message \MessageBag ;
2727use Symfony \Component \Console \Tester \CommandTester ;
2828use Symfony \Component \DependencyInjection \ServiceLocator ;
2929
30- final class ChatCommandTest extends TestCase
30+ final class AgentCallCommandTest extends TestCase
3131{
3232 public function testCommandFailsWithInvalidAgent ()
3333 {
@@ -37,7 +37,7 @@ public function testCommandFailsWithInvalidAgent()
3737 'test ' => $ agent ,
3838 ];
3939
40- $ command = new ChatCommand ($ this ->createServiceLocator ($ agents ));
40+ $ command = new AgentCallCommand ($ this ->createServiceLocator ($ agents ));
4141 $ application = self ::createApplication ($ command );
4242
4343 $ commandTester = new CommandTester ($ command );
@@ -71,7 +71,7 @@ public function testCommandExecutesWithValidAgent()
7171 'test ' => $ agent ,
7272 ];
7373
74- $ command = new ChatCommand ($ this ->createServiceLocator ($ agents ));
74+ $ command = new AgentCallCommand ($ this ->createServiceLocator ($ agents ));
7575 $ application = self ::createApplication ($ command );
7676
7777 $ commandTester = new CommandTester ($ command );
@@ -100,7 +100,7 @@ public function testCommandHandlesQuitCommand()
100100 'test ' => $ agent ,
101101 ];
102102
103- $ command = new ChatCommand ($ this ->createServiceLocator ($ agents ));
103+ $ command = new AgentCallCommand ($ this ->createServiceLocator ($ agents ));
104104 $ application = self ::createApplication ($ command );
105105
106106 $ commandTester = new CommandTester ($ command );
@@ -128,7 +128,7 @@ public function testCommandHandlesAgentCallException()
128128 'test ' => $ agent ,
129129 ];
130130
131- $ command = new ChatCommand ($ this ->createServiceLocator ($ agents ));
131+ $ command = new AgentCallCommand ($ this ->createServiceLocator ($ agents ));
132132 $ application = self ::createApplication ($ command );
133133
134134 $ commandTester = new CommandTester ($ command );
@@ -165,7 +165,7 @@ public function testInitializeMethodSelectsCorrectAgent()
165165 'second ' => $ agent2 ,
166166 ];
167167
168- $ command = new ChatCommand ($ this ->createServiceLocator ($ agents ));
168+ $ command = new AgentCallCommand ($ this ->createServiceLocator ($ agents ));
169169 $ application = self ::createApplication ($ command );
170170
171171 $ commandTester = new CommandTester ($ command );
@@ -203,7 +203,7 @@ public function testCommandWithSystemPromptDisplaysItOnce()
203203 'test ' => $ agent ,
204204 ];
205205
206- $ command = new ChatCommand ($ this ->createServiceLocator ($ agents ));
206+ $ command = new AgentCallCommand ($ this ->createServiceLocator ($ agents ));
207207 $ application = self ::createApplication ($ command );
208208
209209 $ commandTester = new CommandTester ($ command );
0 commit comments