Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: vendor/bin/php-cs-fixer fix --dry-run

- name: Rector
run: vendor/bin/rector
run: vendor/bin/rector --dry-run

- name: PHPStan
run: vendor/bin/phpstan analyse
22 changes: 11 additions & 11 deletions tests/Bridge/OpenAI/GPT/ResponseConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public function testConvertTextResponse(): void

$response = $converter->convert($httpResponse);

$this->assertInstanceOf(TextResponse::class, $response);
$this->assertEquals('Hello world', $response->getContent());
self::assertInstanceOf(TextResponse::class, $response);
self::assertSame('Hello world', $response->getContent());
}

public function testConvertToolCallResponse(): void
Expand Down Expand Up @@ -70,12 +70,12 @@ public function testConvertToolCallResponse(): void

$response = $converter->convert($httpResponse);

$this->assertInstanceOf(ToolCallResponse::class, $response);
self::assertInstanceOf(ToolCallResponse::class, $response);
$toolCalls = $response->getContent();
$this->assertCount(1, $toolCalls);
$this->assertEquals('call_123', $toolCalls[0]->id);
$this->assertEquals('test_function', $toolCalls[0]->name);
$this->assertEquals(['arg1' => 'value1'], $toolCalls[0]->arguments);
self::assertCount(1, $toolCalls);
self::assertSame('call_123', $toolCalls[0]->id);
self::assertSame('test_function', $toolCalls[0]->name);
self::assertSame(['arg1' => 'value1'], $toolCalls[0]->arguments);
}

public function testConvertMultipleChoices(): void
Expand Down Expand Up @@ -103,11 +103,11 @@ public function testConvertMultipleChoices(): void

$response = $converter->convert($httpResponse);

$this->assertInstanceOf(ChoiceResponse::class, $response);
self::assertInstanceOf(ChoiceResponse::class, $response);
$choices = $response->getContent();
$this->assertCount(2, $choices);
$this->assertEquals('Choice 1', $choices[0]->getContent());
$this->assertEquals('Choice 2', $choices[1]->getContent());
self::assertCount(2, $choices);
self::assertSame('Choice 1', $choices[0]->getContent());
self::assertSame('Choice 2', $choices[1]->getContent());
}

public function testContentFilterException(): void
Expand Down