Skip to content

Commit 9bdb696

Browse files
authored
ci: switch rector to dry run for actually failing (#217)
* ci: switch rector to dry run for actually failing * tests: fix assertion style
1 parent aff83f9 commit 9bdb696

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

.github/workflows/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
run: vendor/bin/php-cs-fixer fix --dry-run
6363

6464
- name: Rector
65-
run: vendor/bin/rector
65+
run: vendor/bin/rector --dry-run
6666

6767
- name: PHPStan
6868
run: vendor/bin/phpstan analyse

tests/Bridge/OpenAI/GPT/ResponseConverterTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ public function testConvertTextResponse(): void
3838

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

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

4545
public function testConvertToolCallResponse(): void
@@ -70,12 +70,12 @@ public function testConvertToolCallResponse(): void
7070

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

73-
$this->assertInstanceOf(ToolCallResponse::class, $response);
73+
self::assertInstanceOf(ToolCallResponse::class, $response);
7474
$toolCalls = $response->getContent();
75-
$this->assertCount(1, $toolCalls);
76-
$this->assertEquals('call_123', $toolCalls[0]->id);
77-
$this->assertEquals('test_function', $toolCalls[0]->name);
78-
$this->assertEquals(['arg1' => 'value1'], $toolCalls[0]->arguments);
75+
self::assertCount(1, $toolCalls);
76+
self::assertSame('call_123', $toolCalls[0]->id);
77+
self::assertSame('test_function', $toolCalls[0]->name);
78+
self::assertSame(['arg1' => 'value1'], $toolCalls[0]->arguments);
7979
}
8080

8181
public function testConvertMultipleChoices(): void
@@ -103,11 +103,11 @@ public function testConvertMultipleChoices(): void
103103

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

106-
$this->assertInstanceOf(ChoiceResponse::class, $response);
106+
self::assertInstanceOf(ChoiceResponse::class, $response);
107107
$choices = $response->getContent();
108-
$this->assertCount(2, $choices);
109-
$this->assertEquals('Choice 1', $choices[0]->getContent());
110-
$this->assertEquals('Choice 2', $choices[1]->getContent());
108+
self::assertCount(2, $choices);
109+
self::assertSame('Choice 1', $choices[0]->getContent());
110+
self::assertSame('Choice 2', $choices[1]->getContent());
111111
}
112112

113113
public function testContentFilterException(): void

0 commit comments

Comments
 (0)