Skip to content

Commit 7a6dfba

Browse files
committed
Removed the deprecated url altering
1 parent 4a5c5bc commit 7a6dfba

File tree

1 file changed

+1
-50
lines changed

1 file changed

+1
-50
lines changed

src/Behat/Mink/Driver/BrowserKitDriver.php

+1-50
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ class BrowserKitDriver extends CoreDriver
3939
private $forms = array();
4040
private $serverParameters = array();
4141
private $started = false;
42-
private $removeScriptFromUrl = false;
43-
private $removeHostFromUrl = false;
4442

4543
/**
4644
* Initializes BrowserKit driver.
@@ -68,38 +66,6 @@ public function getClient()
6866
return $this->client;
6967
}
7068

71-
/**
72-
* Tells driver to remove hostname from URL.
73-
*
74-
* @param Boolean $remove
75-
*
76-
* @deprecated Deprecated as of 1.2, to be removed in 2.0. Pass the base url in the constructor instead.
77-
*/
78-
public function setRemoveHostFromUrl($remove = true)
79-
{
80-
trigger_error(
81-
'setRemoveHostFromUrl() is deprecated as of 1.2 and will be removed in 2.0. Pass the base url in the constructor instead.',
82-
E_USER_DEPRECATED
83-
);
84-
$this->removeHostFromUrl = (bool) $remove;
85-
}
86-
87-
/**
88-
* Tells driver to remove script name from URL.
89-
*
90-
* @param Boolean $remove
91-
*
92-
* @deprecated Deprecated as of 1.2, to be removed in 2.0. Pass the base url in the constructor instead.
93-
*/
94-
public function setRemoveScriptFromUrl($remove = true)
95-
{
96-
trigger_error(
97-
'setRemoveScriptFromUrl() is deprecated as of 1.2 and will be removed in 2.0. Pass the base url in the constructor instead.',
98-
E_USER_DEPRECATED
99-
);
100-
$this->removeScriptFromUrl = (bool) $remove;
101-
}
102-
10369
/**
10470
* {@inheritdoc}
10571
*/
@@ -141,7 +107,7 @@ public function reset()
141107
*/
142108
public function visit($url)
143109
{
144-
$this->client->request('GET', $this->prepareUrl($url), array(), array(), $this->serverParameters);
110+
$this->client->request('GET', $url, array(), array(), $this->serverParameters);
145111
$this->forms = array();
146112
}
147113

@@ -534,21 +500,6 @@ protected function getResponse()
534500
return $response;
535501
}
536502

537-
/**
538-
* Prepares URL for visiting.
539-
* Removes "*.php/" from urls and then passes it to BrowserKitDriver::visit().
540-
*
541-
* @param string $url
542-
*
543-
* @return string
544-
*/
545-
protected function prepareUrl($url)
546-
{
547-
$replacement = ($this->removeHostFromUrl ? '' : '$1') . ($this->removeScriptFromUrl ? '' : '$2');
548-
549-
return preg_replace('#(https?\://[^/]+)(/[^/\.]+\.php)?#', $replacement, $url);
550-
}
551-
552503
/**
553504
* Returns form field from XPath query.
554505
*

0 commit comments

Comments
 (0)