We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c0a37d commit cbb22efCopy full SHA for cbb22ef
tests/PluginClientBuilderTest.php
@@ -49,6 +49,29 @@ function (): array {
49
$this->assertSame($expected, $plugged);
50
}
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
75
public function clientProvider(): iterable
76
{
77
yield 'sync\'d http client' => [HttpClient::class];
0 commit comments