-
-
Notifications
You must be signed in to change notification settings - Fork 263
Expand file tree
/
Copy pathGuzzleTransporterTest.php
More file actions
35 lines (22 loc) · 832 Bytes
/
GuzzleTransporterTest.php
File metadata and controls
35 lines (22 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
use GuzzleHttp\Client;
use OpenAI\Laravel\GuzzleTransporter;
test('getRetryMiddleware returns a callable', function () {
$instance = new GuzzleTransporter();
$retryMiddleware = $instance->getRetryMiddleware();
expect($retryMiddleware)->toBeCallable();
});
test('getClient returns a Client', function () {
$instance = GuzzleTransporter::getClient();
expect($instance)->toBeInstanceOf(Client::class);
});
test('getDelayDuration returns a callable', function () {
$instance = new GuzzleTransporter();
$delayCallable = $instance->getDelayDuration();
expect($delayCallable)->toBeCallable();
});
test('getDecider returns a callable', function () {
$instance = new GuzzleTransporter();
$deciderCallable = $instance->getDecider();
expect($deciderCallable)->toBeCallable();
});