@@ -39,8 +39,6 @@ class BrowserKitDriver extends CoreDriver
39
39
private $ forms = array ();
40
40
private $ serverParameters = array ();
41
41
private $ started = false ;
42
- private $ removeScriptFromUrl = false ;
43
- private $ removeHostFromUrl = false ;
44
42
45
43
/**
46
44
* Initializes BrowserKit driver.
@@ -68,38 +66,6 @@ public function getClient()
68
66
return $ this ->client ;
69
67
}
70
68
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
-
103
69
/**
104
70
* {@inheritdoc}
105
71
*/
@@ -141,7 +107,7 @@ public function reset()
141
107
*/
142
108
public function visit ($ url )
143
109
{
144
- $ this ->client ->request ('GET ' , $ this -> prepareUrl ( $ url) , array (), array (), $ this ->serverParameters );
110
+ $ this ->client ->request ('GET ' , $ url , array (), array (), $ this ->serverParameters );
145
111
$ this ->forms = array ();
146
112
}
147
113
@@ -547,21 +513,6 @@ protected function getResponse()
547
513
return $ response ;
548
514
}
549
515
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
-
565
516
/**
566
517
* Returns form field from XPath query.
567
518
*
0 commit comments