format($message); $this->assertCount(1, $result); $this->assertSame($message, $result[0]); } public function testFormatUserAssistantShorthand(): void { $result = (new PromptResultFormatter())->format([ 'user' => 'Hello', 'assistant' => 'Hi there', ]); $this->assertCount(2, $result); $this->assertSame(Role::User, $result[0]->role); $this->assertSame(Role::Assistant, $result[1]->role); } public function testFormatRoleContentArray(): void { $result = (new PromptResultFormatter())->format([ ['role' => 'user', 'content' => 'Hello'], ]); $this->assertCount(1, $result); $this->assertSame(Role::User, $result[0]->role); } }