File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,23 @@ class GrokConfigTest extends TestCase
1010{
1111 public function test_it_uses_default_values_when_not_overridden ()
1212 {
13- // soon ...
13+ $ config = new GrokConfig (apiKey: 'test-api-key ' );
14+
15+ $ this ->assertEquals ('test-api-key ' , $ config ->apiKey );
16+ $ this ->assertEquals (DefaultConfig::BASE_URI ->value , $ config ->baseUri );
17+ $ this ->assertEquals ((int ) DefaultConfig::TIMEOUT ->value , $ config ->timeout );
18+ }
19+
20+ public function test_it_allows_custom_values ()
21+ {
22+ $ customBaseUri = 'https://custom-api.grok.dev ' ;
23+
24+ $ config = new GrokConfig (
25+ apiKey: 'test-api-key ' ,
26+ baseUri: $ customBaseUri ,
27+ );
28+
29+ $ this ->assertEquals ('test-api-key ' , $ config ->apiKey );
30+ $ this ->assertEquals ($ customBaseUri , $ config ->baseUri );
1431 }
1532}
You can’t perform that action at this time.
0 commit comments