|
17 | 17 |
|
18 | 18 | $config = SessionConfig::fromArray([ |
19 | 19 | 'sessionId' => 'test-session-id', |
| 20 | + 'clientName' => 'my-app', |
20 | 21 | 'model' => 'claude-sonnet-4.5', |
21 | 22 | 'configDir' => '/tmp/config', |
22 | 23 | 'tools' => [['name' => 'test_tool']], |
|
37 | 38 | ]); |
38 | 39 |
|
39 | 40 | expect($config->sessionId)->toBe('test-session-id') |
| 41 | + ->and($config->clientName)->toBe('my-app') |
40 | 42 | ->and($config->model)->toBe('claude-sonnet-4.5') |
41 | 43 | ->and($config->configDir)->toBe('/tmp/config') |
42 | 44 | ->and($config->tools)->toBe([['name' => 'test_tool']]) |
|
63 | 65 | $config = SessionConfig::fromArray([]); |
64 | 66 |
|
65 | 67 | expect($config->sessionId)->toBeNull() |
| 68 | + ->and($config->clientName)->toBeNull() |
66 | 69 | ->and($config->model)->toBeNull() |
67 | 70 | ->and($config->configDir)->toBeNull() |
68 | 71 | ->and($config->tools)->toBeNull() |
|
107 | 110 |
|
108 | 111 | $config = new SessionConfig( |
109 | 112 | sessionId: 'session-123', |
| 113 | + clientName: 'my-app', |
110 | 114 | model: 'gpt-4', |
111 | 115 | configDir: '/config', |
112 | 116 | tools: [['name' => 'tool1']], |
|
129 | 133 | $array = $config->toArray(); |
130 | 134 |
|
131 | 135 | expect($array['sessionId'])->toBe('session-123') |
| 136 | + ->and($array['clientName'])->toBe('my-app') |
132 | 137 | ->and($array['model'])->toBe('gpt-4') |
133 | 138 | ->and($array['configDir'])->toBe('/config') |
134 | 139 | ->and($array['tools'])->toBe([['name' => 'tool1']]) |
|
0 commit comments