@@ -40,8 +40,6 @@ class BrowserKitDriver extends CoreDriver
4040 private $ forms = array ();
4141 private $ serverParameters = array ();
4242 private $ started = false ;
43- private $ removeScriptFromUrl = false ;
44- private $ removeHostFromUrl = false ;
4543
4644 /**
4745 * Initializes BrowserKit driver.
@@ -69,38 +67,6 @@ public function getClient()
6967 return $ this ->client ;
7068 }
7169
72- /**
73- * Tells driver to remove hostname from URL.
74- *
75- * @param boolean $remove
76- *
77- * @deprecated Deprecated as of 1.2, to be removed in 2.0. Pass the base url in the constructor instead.
78- */
79- public function setRemoveHostFromUrl ($ remove = true )
80- {
81- @trigger_error (
82- 'setRemoveHostFromUrl() is deprecated as of 1.2 and will be removed in 2.0. Pass the base url in the constructor instead. ' ,
83- E_USER_DEPRECATED
84- );
85- $ this ->removeHostFromUrl = (bool ) $ remove ;
86- }
87-
88- /**
89- * Tells driver to remove script name from URL.
90- *
91- * @param boolean $remove
92- *
93- * @deprecated Deprecated as of 1.2, to be removed in 2.0. Pass the base url in the constructor instead.
94- */
95- public function setRemoveScriptFromUrl ($ remove = true )
96- {
97- @trigger_error (
98- 'setRemoveScriptFromUrl() is deprecated as of 1.2 and will be removed in 2.0. Pass the base url in the constructor instead. ' ,
99- E_USER_DEPRECATED
100- );
101- $ this ->removeScriptFromUrl = (bool ) $ remove ;
102- }
103-
10470 /**
10571 * {@inheritdoc}
10672 */
@@ -578,13 +544,7 @@ protected function getResponse()
578544 */
579545 protected function prepareUrl ($ url )
580546 {
581- if (!$ this ->removeHostFromUrl && !$ this ->removeScriptFromUrl ) {
582- return $ url ;
583- }
584-
585- $ replacement = ($ this ->removeHostFromUrl ? '' : '$1 ' ) . ($ this ->removeScriptFromUrl ? '' : '$2 ' );
586-
587- return preg_replace ('#(https?\://[^/]+)(/[^/\.]+\.php)?# ' , $ replacement , $ url );
547+ return $ url ;
588548 }
589549
590550 /**
0 commit comments