Skip to content

Commit 0063c6e

Browse files
committed
Fix TypeError in AssistantMessageNormalizer when toolCalls is null
1 parent 23e6807 commit 0063c6e

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/platform/tests/Bridge/Anthropic/Contract/AssistantMessageNormalizerTest.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,22 @@ public function testNormalize(AssistantMessage $message, array $expectedOutput)
5555

5656
$normalized = $normalizer->normalize($message);
5757

58-
$this->assertEquals($expectedOutput, $normalized);
58+
$this->assertSame($expectedOutput, $normalized);
5959
}
6060

6161
/**
62-
* @return iterable<string, array{AssistantMessage, array{text?: string, functionCall?: array{id: string, name: string, args?: mixed}}[]}>
62+
* @return iterable<string, array{
63+
* 0: AssistantMessage,
64+
* 1: array{
65+
* role: 'assistant',
66+
* content: string|list<array{
67+
* type: 'tool_use',
68+
* id: string,
69+
* name: string,
70+
* input: array<string, mixed>|\stdClass
71+
* }>
72+
* }
73+
* }>
6374
*/
6475
public static function normalizeDataProvider(): iterable
6576
{

0 commit comments

Comments
 (0)