Skip to content

Commit b949d48

Browse files
committed
test: Add test for DeepLClientOptions
1 parent 78fad3c commit b949d48

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/RephraseTextTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,19 @@ public function testBusinessStyle(?ClientInterface $httpClient)
5353
$this->checkSanityOfImprovements($input, $result);
5454
}
5555

56+
/**
57+
* @dataProvider provideHttpClient
58+
*/
59+
public function testConfiguredDeepLClient(?ClientInterface $httpClient)
60+
{
61+
$deeplClient = $this->makeDeeplClient([
62+
DeepLClientOptions::HTTP_CLIENT => $httpClient,
63+
DeepLClientOptions::DEFAULT_MAX_RETRIES => 2
64+
]);
65+
$result = $deeplClient->rephraseText(DeepLTestBase::EXAMPLE_TEXT['en'], 'en-GB');
66+
$this->checkSanityOfImprovements(DeepLTestBase::EXAMPLE_TEXT['en'], $result);
67+
}
68+
5669
private function checkSanityOfImprovements(
5770
string $inputText,
5871
RephraseTextResult $result,

0 commit comments

Comments
 (0)