23
23
#[CoversClass(ProviderConfigFactory::class)]
24
24
class ProviderConfigFactoryTest extends TestCase
25
25
{
26
- public function testOpenAiDefaults (): void
26
+ public function testOpenAiDefaults ()
27
27
{
28
28
$ cfg = ProviderConfigFactory::fromDsn (
29
29
'ai+openai://[email protected] ?model=gpt-4o-mini&organization=org_123&headers[x-foo]=bar '
@@ -37,15 +37,15 @@ public function testOpenAiDefaults(): void
37
37
$ this ->assertSame ('bar ' , $ cfg ->headers ['x-foo ' ] ?? null );
38
38
}
39
39
40
- public function testOpenAiWithoutHostUsesDefault (): void
40
+ public function testOpenAiWithoutHostUsesDefault ()
41
41
{
42
42
$ cfg = ProviderConfigFactory::fromDsn ('ai+openai://sk-test@/?model=gpt-4o-mini ' );
43
43
44
44
$ this ->assertSame ('https://api.openai.com ' , $ cfg ->baseUri );
45
45
$ this ->assertSame ('gpt-4o-mini ' , $ cfg ->options ['model ' ] ?? null );
46
46
}
47
47
48
- public function testAzureOpenAiHappyPath (): void
48
+ public function testAzureOpenAiHappyPath ()
49
49
{
50
50
$ cfg = ProviderConfigFactory::fromDsn (
51
51
'ai+azure://[email protected] ?deployment=gpt-4o&version=2024-08-01-preview&engine=openai '
@@ -59,7 +59,7 @@ public function testAzureOpenAiHappyPath(): void
59
59
$ this ->assertSame ('openai ' , $ cfg ->options ['engine ' ] ?? null );
60
60
}
61
61
62
- public function testAzureMetaHappyPath (): void
62
+ public function testAzureMetaHappyPath ()
63
63
{
64
64
$ cfg = ProviderConfigFactory::fromDsn (
65
65
'ai+azure://[email protected] ?deployment=llama-3.1&version=2024-08-01-preview&engine=meta '
@@ -71,7 +71,7 @@ public function testAzureMetaHappyPath(): void
71
71
$ this ->assertSame ('llama-3.1 ' , $ cfg ->options ['deployment ' ] ?? null );
72
72
}
73
73
74
- public function testGenericOptionsAndBooleans (): void
74
+ public function testGenericOptionsAndBooleans ()
75
75
{
76
76
$ cfg = ProviderConfigFactory::fromDsn (
77
77
'ai+openai://sk@/?model=gpt-4o-mini&timeout=10&verify_peer=true&proxy=http://proxy:8080 '
@@ -82,31 +82,31 @@ public function testGenericOptionsAndBooleans(): void
82
82
$ this ->assertSame ('http://proxy:8080 ' , $ cfg ->options ['proxy ' ] ?? null );
83
83
}
84
84
85
- public function testUnknownProviderThrows (): void
85
+ public function testUnknownProviderThrows ()
86
86
{
87
87
$ this ->expectException (\InvalidArgumentException::class);
88
88
ProviderConfigFactory::fromDsn ('ai+unknown://key@host ' );
89
89
}
90
90
91
- public function testAzureMissingHostThrows (): void
91
+ public function testAzureMissingHostThrows ()
92
92
{
93
93
$ this ->expectException (\InvalidArgumentException::class);
94
94
ProviderConfigFactory::fromDsn ('ai+azure://AZ_KEY@/?deployment=gpt-4o&version=2024-08-01-preview ' );
95
95
}
96
96
97
- public function testAzureMissingDeploymentThrows (): void
97
+ public function testAzureMissingDeploymentThrows ()
98
98
{
99
99
$ this ->expectException (\InvalidArgumentException::class);
100
100
ProviderConfigFactory::
fromDsn (
'ai+azure://[email protected] ?version=2024-08-01-preview ' );
101
101
}
102
102
103
- public function testAzureMissingVersionThrows (): void
103
+ public function testAzureMissingVersionThrows ()
104
104
{
105
105
$ this ->expectException (\InvalidArgumentException::class);
106
106
ProviderConfigFactory::
fromDsn (
'ai+azure://[email protected] ?deployment=gpt-4o ' );
107
107
}
108
108
109
- public function testAzureUnsupportedEngineThrows (): void
109
+ public function testAzureUnsupportedEngineThrows ()
110
110
{
111
111
$ this ->expectException (\InvalidArgumentException::class);
112
112
ProviderConfigFactory::fromDsn (
0 commit comments