From 7a6dfba1f69768ef4f8556e76f2d0409c97b382e Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Fri, 2 May 2014 11:38:50 +0200 Subject: [PATCH] Removed the deprecated url altering --- src/Behat/Mink/Driver/BrowserKitDriver.php | 51 +--------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/src/Behat/Mink/Driver/BrowserKitDriver.php b/src/Behat/Mink/Driver/BrowserKitDriver.php index ea22116..5fbc2f9 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(); } @@ -534,21 +500,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. *