Skip to content

fix BrowserKit Client to AbstractBrowser rename #12717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions components/browser_kit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ Creating a Client
The component only provides an abstract client and does not provide any backend
ready to use for the HTTP layer.

To create your own client, you must extend the abstract ``Client`` class and
implement the :method:`Symfony\\Component\\BrowserKit\\Client::doRequest` method.
To create your own client, you must extend the ``AbstractBrowser`` class and
implement the :method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::doRequest` method.
This method accepts a request and should return a response::

namespace Acme;

use Symfony\Component\BrowserKit\Client as BaseClient;
use Symfony\Component\BrowserKit\AbstractBrowser;
use Symfony\Component\BrowserKit\Response;

class Client extends BaseClient
class Client extends AbstractBrowser
{
protected function doRequest($request)
{
Expand All @@ -66,7 +66,7 @@ the :doc:`HttpKernel component </components/http_kernel>`.
Making Requests
~~~~~~~~~~~~~~~

Use the :method:`Symfony\\Component\\BrowserKit\\Client::request` method to
Use the :method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::request` method to
make HTTP requests. The first two arguments are the HTTP method and the requested
URL::

Expand All @@ -80,7 +80,7 @@ The value returned by the ``request()`` method is an instance of the
:doc:`DomCrawler component </components/dom_crawler>`, which allows accessing
and traversing HTML elements programmatically.

The :method:`Symfony\\Component\\BrowserKit\\Client::xmlHttpRequest` method,
The :method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::xmlHttpRequest` method,
which defines the same arguments as the ``request()`` method, is a shortcut to
make AJAX requests::

Expand Down
2 changes: 1 addition & 1 deletion testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ script::
AJAX Requests
~~~~~~~~~~~~~

The Client provides a :method:`Symfony\\Component\\BrowserKit\\Client::xmlHttpRequest`
The Client provides a :method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::xmlHttpRequest`
method, which has the same arguments as the ``request()`` method, and it's a
shortcut to make AJAX requests::

Expand Down