You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: integrations/symfony-bundle.rst
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -244,6 +244,32 @@ services are:
244
244
my_client:
245
245
service: 'my_custom_client_service'
246
246
247
+
.. versionadded:: 1.17
248
+
249
+
All configured clients are tagged with ``'httplug.client'`` (the value of the constant ``Http\HttplugBundle\DependencyInjection\HttplugExtension::HTTPLUG_CLIENT_TAG``),
250
+
so they can be easily retrieved. This is useful for functional tests, where one might want to replace every
251
+
configured client with a mock client, so they can be retrieved and configured later
252
+
253
+
.. code-block:: php
254
+
255
+
use Http\HttplugBundle\DependencyInjection\HttplugExtension;
256
+
use Http\Mock\Client;
257
+
use Symfony\Component\DependencyInjection\ContainerBuilder;
0 commit comments