@@ -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
@@ -547,21 +513,6 @@ protected function getResponse()
547513 return $ response ;
548514 }
549515
550- /**
551- * Prepares URL for visiting.
552- * Removes "*.php/" from urls and then passes it to BrowserKitDriver::visit().
553- *
554- * @param string $url
555- *
556- * @return string
557- */
558- protected function prepareUrl ($ url )
559- {
560- $ replacement = ($ this ->removeHostFromUrl ? '' : '$1 ' ) . ($ this ->removeScriptFromUrl ? '' : '$2 ' );
561-
562- return preg_replace ('#(https?\://[^/]+)(/[^/\.]+\.php)?# ' , $ replacement , $ url );
563- }
564-
565516 /**
566517 * Returns form field from XPath query.
567518 *
0 commit comments