4 * This file is part of the Behat\Mink.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 namespace Behat\Mink\Driver;
13 use Behat\Mink\Driver\Goutte\Client as ExtendedClient;
19 * @author Konstantin Kudryashov <ever.zet@gmail.com>
21 class GoutteDriver extends BrowserKitDriver
24 * Initializes Goutte driver.
26 * @param Client $client Goutte client instance
28 public function __construct(Client $client = null)
30 parent::__construct($client ?: new ExtendedClient());
36 public function setBasicAuth($user, $password)
38 if (false === $user) {
39 $this->getClient()->resetAuth();
44 $this->getClient()->setAuth($user, $password);
48 * Gets the Goutte client.
50 * The method is overwritten only to provide the appropriate return type hint.
54 public function getClient()
56 return parent::getClient();
62 public function reset()
65 $this->getClient()->resetAuth();
71 protected function prepareUrl($url)