diff --git a/src/Behat/Mink/Driver/BrowserKitDriver.php b/src/Behat/Mink/Driver/BrowserKitDriver.php index b5f46f0..0b375ed 100644 --- a/src/Behat/Mink/Driver/BrowserKitDriver.php +++ b/src/Behat/Mink/Driver/BrowserKitDriver.php @@ -39,8 +39,6 @@ class BrowserKitDriver extends CoreDriver private $forms = array(); private $serverParameters = array(); private $started = false; - private $removeScriptFromUrl = false; - private $removeHostFromUrl = false; /** * Initializes BrowserKit driver. @@ -68,38 +66,6 @@ public function getClient() return $this->client; } - /** - * Tells driver to remove hostname from URL. - * - * @param Boolean $remove - * - * @deprecated Deprecated as of 1.2, to be removed in 2.0. Pass the base url in the constructor instead. - */ - public function setRemoveHostFromUrl($remove = true) - { - trigger_error( - 'setRemoveHostFromUrl() is deprecated as of 1.2 and will be removed in 2.0. Pass the base url in the constructor instead.', - E_USER_DEPRECATED - ); - $this->removeHostFromUrl = (bool) $remove; - } - - /** - * Tells driver to remove script name from URL. - * - * @param Boolean $remove - * - * @deprecated Deprecated as of 1.2, to be removed in 2.0. Pass the base url in the constructor instead. - */ - public function setRemoveScriptFromUrl($remove = true) - { - trigger_error( - 'setRemoveScriptFromUrl() is deprecated as of 1.2 and will be removed in 2.0. Pass the base url in the constructor instead.', - E_USER_DEPRECATED - ); - $this->removeScriptFromUrl = (bool) $remove; - } - /** * {@inheritdoc} */ @@ -141,7 +107,7 @@ public function reset() */ public function visit($url) { - $this->client->request('GET', $this->prepareUrl($url), array(), array(), $this->serverParameters); + $this->client->request('GET', $url, array(), array(), $this->serverParameters); $this->forms = array(); } @@ -547,21 +513,6 @@ protected function getResponse() return $response; } - /** - * Prepares URL for visiting. - * Removes "*.php/" from urls and then passes it to BrowserKitDriver::visit(). - * - * @param string $url - * - * @return string - */ - protected function prepareUrl($url) - { - $replacement = ($this->removeHostFromUrl ? '' : '$1') . ($this->removeScriptFromUrl ? '' : '$2'); - - return preg_replace('#(https?\://[^/]+)(/[^/\.]+\.php)?#', $replacement, $url); - } - /** * Returns form field from XPath query. *