File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,29 @@ function (): array {
49
49
$ this ->assertSame ($ expected , $ plugged );
50
50
}
51
51
52
+ /** @dataProvider clientProvider */
53
+ public function testOptions (string $ client ): void
54
+ {
55
+ $ builder = new PluginClientBuilder ();
56
+ $ builder ->setOption ('max_restarts ' , 5 );
57
+
58
+ $ client = $ this ->prophesize ($ client )->reveal ();
59
+ $ client = $ builder ->createClient ($ client );
60
+
61
+ $ closure = Closure::bind (
62
+ function (): array {
63
+ return $ this ->options ;
64
+ },
65
+ $ client ,
66
+ PluginClient::class
67
+ );
68
+
69
+ $ options = $ closure ();
70
+
71
+ $ this ->assertArrayHasKey ('max_restarts ' , $ options );
72
+ $ this ->assertSame (5 , $ options ['max_restarts ' ]);
73
+ }
74
+
52
75
public function clientProvider (): iterable
53
76
{
54
77
yield 'sync \'d http client ' => [HttpClient::class];
You can’t perform that action at this time.
0 commit comments