@@ -39,16 +39,16 @@ Creating a Client
39
39
The component only provides an abstract client and does not provide any backend
40
40
ready to use for the HTTP layer.
41
41
42
- To create your own client, you must extend the abstract ``Client `` class and
43
- implement the :method: `Symfony\\ Component\\ BrowserKit\\ Client ::doRequest ` method.
42
+ To create your own client, you must extend the abstract ``AbstractBrowser `` class and
43
+ implement the :method: `Symfony\\ Component\\ BrowserKit\\ AbstractBrowser ::doRequest ` method.
44
44
This method accepts a request and should return a response::
45
45
46
46
namespace Acme;
47
47
48
- use Symfony\Component\BrowserKit\Client as BaseClient ;
48
+ use Symfony\Component\BrowserKit\AbstractBrowser ;
49
49
use Symfony\Component\BrowserKit\Response;
50
50
51
- class Client extends BaseClient
51
+ class Client extends AbstractBrowser
52
52
{
53
53
protected function doRequest($request)
54
54
{
@@ -67,7 +67,7 @@ provided by the :doc:`HttpKernel component </components/http_kernel>`.
67
67
Making Requests
68
68
~~~~~~~~~~~~~~~
69
69
70
- Use the :method: `Symfony\\ Component\\ BrowserKit\\ Client ::request ` method to
70
+ Use the :method: `Symfony\\ Component\\ BrowserKit\\ AbstractBrowser ::request ` method to
71
71
make HTTP requests. The first two arguments are the HTTP method and the requested
72
72
URL::
73
73
@@ -81,7 +81,7 @@ The value returned by the ``request()`` method is an instance of the
81
81
:doc: `DomCrawler component </components/dom_crawler >`, which allows accessing
82
82
and traversing HTML elements programmatically.
83
83
84
- The :method: `Symfony\\ Component\\ BrowserKit\\ Client ::xmlHttpRequest ` method,
84
+ The :method: `Symfony\\ Component\\ BrowserKit\\ AbstractBrowser ::xmlHttpRequest ` method,
85
85
which defines the same arguments as the ``request() `` method, is a shortcut to
86
86
make AJAX requests::
87
87
@@ -94,7 +94,7 @@ make AJAX requests::
94
94
Clicking Links
95
95
~~~~~~~~~~~~~~
96
96
97
- The ``Client `` object is capable of simulating link clicks. Pass the text
97
+ The ``AbstractBrowser `` is capable of simulating link clicks. Pass the text
98
98
content of the link and the client will perform the needed HTTP GET request to
99
99
simulate the link click::
100
100
@@ -117,7 +117,7 @@ provides access to the link properties (e.g. ``$link->getMethod()``,
117
117
Submitting Forms
118
118
~~~~~~~~~~~~~~~~
119
119
120
- The ``Client `` object is also capable of submitting forms. First, select the
120
+ The ``AbstractBrowser `` is also capable of submitting forms. First, select the
121
121
form using any of its buttons and then override any of its properties (method,
122
122
field values, etc.) before submitting it::
123
123
@@ -168,7 +168,7 @@ Cookies
168
168
Retrieving Cookies
169
169
~~~~~~~~~~~~~~~~~~
170
170
171
- The ``Client `` implementation exposes cookies (if any) through a
171
+ The ``AbstractBrowser `` implementation exposes cookies (if any) through a
172
172
:class: `Symfony\\ Component\\ BrowserKit\\ CookieJar `, which allows you to store and
173
173
retrieve any cookie while making requests with the client::
174
174
0 commit comments