@@ -25,23 +25,6 @@ class ModelClientTest extends TestCase
2525 private ModelClient $ modelClient ;
2626 private Claude $ model ;
2727
28- protected function setUp (): void
29- {
30- $ this ->model = new Claude ();
31- }
32-
33- private function parseHeaders (array $ headers ): array
34- {
35- $ parsed = [];
36- foreach ($ headers as $ header ) {
37- if (strpos ($ header , ': ' ) !== false ) {
38- [$ key , $ value ] = explode (': ' , $ header , 2 );
39- $ parsed [trim ($ key )] = trim ($ value );
40- }
41- }
42- return $ parsed ;
43- }
44-
4528 public function testAnthropicBetaHeaderIsSetWithSingleBetaFeature (): void
4629 {
4730 $ this ->httpClient = new MockHttpClient (function ($ method , $ url , $ options ) {
@@ -110,4 +93,21 @@ public function testAnthropicBetaHeaderIsNotSetWhenBetaFeaturesIsNotProvided():
11093 $ options = ['some_other_option ' => 'value ' ];
11194 $ this ->modelClient ->request ($ this ->model , ['message ' => 'test ' ], $ options );
11295 }
96+
97+ protected function setUp (): void
98+ {
99+ $ this ->model = new Claude ();
100+ }
101+
102+ private function parseHeaders (array $ headers ): array
103+ {
104+ $ parsed = [];
105+ foreach ($ headers as $ header ) {
106+ if (strpos ($ header , ': ' ) !== false ) {
107+ [$ key , $ value ] = explode (': ' , $ header , 2 );
108+ $ parsed [trim ($ key )] = trim ($ value );
109+ }
110+ }
111+ return $ parsed ;
112+ }
113113}
0 commit comments