Skip to content

Commit 6c5a809

Browse files
committed
Minor tweak
1 parent 724c1a5 commit 6c5a809

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

http_client.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,9 +1462,12 @@ However, using ``MockResponse`` allows simulating chunked responses and timeouts
14621462

14631463
$mockResponse = new MockResponse($body());
14641464

1465-
Using the Symfony Framework, if you want to use your callback in functional tests, you can do as follow:
1465+
.. versionadded:: 5.2
1466+
1467+
The feature explained below was introduced in Symfony 5.2.
14661468

1467-
First, create an invokable or iterable class responsible of generating the response::
1469+
Finally, you can also create an invokable or iterable class that generates the
1470+
responses and use it as a callback in functional tests::
14681471

14691472
namespace App\Tests;
14701473

@@ -1481,7 +1484,7 @@ First, create an invokable or iterable class responsible of generating the respo
14811484
}
14821485
}
14831486

1484-
Then configure the framework to use your callback:
1487+
Then configure Symfony to use your callback:
14851488

14861489
.. configuration-block::
14871490

@@ -1535,9 +1538,6 @@ Then configure the framework to use your callback:
15351538
],
15361539
]);
15371540
1538-
1539-
The ``MockHttpClient`` will now be used in test environment with your callback to generate responses.
1540-
15411541
.. _`cURL PHP extension`: https://www.php.net/curl
15421542
.. _`PSR-17`: https://www.php-fig.org/psr/psr-17/
15431543
.. _`PSR-18`: https://www.php-fig.org/psr/psr-18/

0 commit comments

Comments
 (0)